Commit graph

707 commits

Author SHA1 Message Date
mame
f9ac9e2dfc * ext/stringio/stringio.c (strio_init): rewind when reopened.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-11 18:30:10 +00:00
akr
6b4c2401aa * hash.c (hash_i): make Hash#hash order insensitive.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07 16:19:47 +00:00
nobu
9ac3b79bcf * test/iconv/utils.rb (default_test): override not to croak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-06 09:25:46 +00:00
knu
6a7a00325e * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):
Add a null check for ssl; submitted by akira yamada
  in [ruby-dev:34950].

* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if
  SSL_OP_NO_TICKET is present; submitted by akira yamada
  in [ruby-dev:34944].

* test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a
  workaround for the case where OpenSSL is configured with
  --enable-tlsext; submitted by akira yamada in [ruby-dev:34944].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05 11:39:21 +00:00
nobu
858a6e2347 * test/iconv/utils.rb (TestIconv.testcase): make test cases conditionally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05 05:35:00 +00:00
nobu
ac2ccf3165 * test/iconv/test_{basic,option}.rb, test/iconv/utils.rb: added.
* test/iconv/test_partial.rb: renamed from test_simple.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05 04:58:41 +00:00
nobu
76207396b3 * test/iconv/test_simple.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05 01:58:49 +00:00
knu
ce5770b5db Pull in the test suite for enumerator from trunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-03 11:04:15 +00:00
seki
29d4220e9b Fix without strscan problems. [ruby_core:17028].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02 19:07:45 +00:00
knu
6b16264865 * lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Fix a bug
where tokens are not yilelded one by one.

* test/erb/test_erb.rb (TestERBCore#_test_01)
  (TestERBCore#test_02_safe_04): The expected value should come
  first for assert_equal().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02 06:58:05 +00:00
knu
14dd72b35a * enum.c (count_i, count_iter_i): Sync with trunk.
enum.c (enum_count, count_all_i, Init_Enumerable),
  array.c (rb_ary_count): Sync with trunk.  If no argument or
  block is given, count the number of all elements.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29 19:35:04 +00:00
nobu
0ba197f08f * array.c (flatten): check if reentered. [ruby-dev:34798]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 05:20:59 +00:00
gotoyuzo
ae2b541b23 test material for r16454.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18 13:54:22 +00:00
gotoyuzo
9645f5983f * lib/webrick/httpservlet/filehandler.rb: should normalize path
name in path_info to prevent script disclosure vulnerability on
  DOSISH filesystems. (fix: CVE-2008-1891)
  Note: NTFS/FAT filesystem should not be published by the platforms
  other than Windows. Pathname interpretation (including short
  filename) is less than perfect.

* lib/webrick/httpservlet/abstract.rb
  (WEBrick::HTTPServlet::AbstracServlet#redirect_to_directory_uri):
  should escape the value of Location: header. 

* lib/webrick/httpservlet/cgi_runner.rb: accept interpreter
  command line arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-18 13:33:57 +00:00
knu
d007e7d20f * array.c (rb_ary_count): Override Enumerable#count for better
performance.
  (rb_ary_nitems): Undo the backport.  Use #count {} instead.

* enumerator.c (enumerator_iter_i): Remove an unused function.
  (enumerator_with_index, enumerator_each): Remove unused
  variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-14 10:26:48 +00:00
kazu
5fed7fa349 * eval.c (method_name, method_owner): New methods; backported from 1.9. (UnboundMethod#name, UnboundMethod#owner)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-11 01:38:12 +00:00
knu
f2323f8869 * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a block
to a Proc.  [ruby-dev:23533]

* parse.y (block_par, block_var): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26 10:37:13 +00:00
kazu
545c0d6aa3 * lib/net/pop.rb: backported from 1.9. bug#19003
* ext/openssl/lib/openssl/ssl.rb: set_params; backported from 1.9.
  bug#19552, [ruby-dev:34402]

* ext/openssl/ossl_ssl.c: ditto.

* test/openssl/test_ssl.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 14:52:21 +00:00
kazu
e78826ffec * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create): failed
notice moved from comment to assertion message. [ruby-dev:29127]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-23 06:33:20 +00:00
kazu
44837a4fd2 * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve tests of Symbol#to_proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 15:25:23 +00:00
kazu
56b9d66662 add a test of Symbol#to_proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 13:05:06 +00:00
knu
a2b186bee4 * eval.c (rb_proc_new): Turn the BLOCK_LAMBDA flag on.
* object.c (sym_to_proc), test/ruby/test_symbol.rb: Add back
  Symbol#to_proc, now that it passes the tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 12:42:57 +00:00
knu
1503012e4f * object.c, NEWS, test/ruby/test_symbol.rb: Revert Symbol#to_proc
since it does not pass the tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 09:01:04 +00:00
knu
6fb3ce9804 * lib/yaml/baseemitter.rb, lib/yaml/encoding.rb: performance
tuning around String#gsub.

* lib/yaml/tag.rb: Replace nodoc with stopdoc so Module methods get
  documented.

* lib/yaml/store.rb (YAML::load): modified to support empty
  database.

* lib/yaml/store.rb (YAML::Store::marshal_dump_supports_canonical_option?):
  add a method to support faster PStore.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19 11:38:35 +00:00
knu
bf11d6ee76 * lib/yaml/types.rb: Likewise, pass self to YAML::quick_emit;
merged from 1.9.

* lib/yaml.rb (quick_emit): use combination of object_id and hash to
  identify repeated object references, since GC will reuse memory of
  objects during output of YAML. [ruby-Bugs-8548] [ruby-Bugs-3698];
  merged from 1.9.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-19 11:21:23 +00:00
akira
04fca10a96 * lib/uri/ftp.rb, lib/uri/generic.rb, test/uri/test_common.rb,
test/uri/test_ftp.rb, test/uri/test_generic.rb: backported from 1.9.
  [ruby-dev:31318]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-17 13:05:17 +00:00
knu
f78129fc6a * test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_event):
Fix tests to reflect the following changes: r15833, r15759.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 21:11:37 +00:00
knu
dd0eebd62a * lib/xmlrpc/client.rb: fix cookie handling. [ruby-dev:34403]
* test/xmlrpc/test_cookie.rb: add a test for the above fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 17:10:38 +00:00
kazu
3be6ebc5ce * eval.c (method_receiver, method_name, method_owner): New
methods; backported from 1.9. bug#19007


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 10:07:59 +00:00
kazu
bb3f83697d * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-15 08:06:33 +00:00
knu
f2dc726691 * array.c (rb_ary_flatten, rb_ary_flatten_bang): Take an optional
argument that determines the level of recursion to flatten;
  backported from 1.9.

* array.c (rb_ary_shuffle_bang, rb_ary_shuffle, rb_ary_choice,
  rb_ary_cycle, rb_ary_permutation, rb_ary_combination,
  rb_ary_product, rb_ary_take, rb_ary_take_while, rb_ary_drop,
  rb_ary_drop_while): New methods: Array#shuffle, #shuffle!,
  #choice, #cycle, #permutation, #combination, #product, #take,
  #take_while, #drop, #drop_while; backported from 1.9.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 11:03:42 +00:00
knu
1b90348252 * enum.c New methods: Enumerable#take, #take_while, #drop and
#drop_while; backported from 1.9.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 10:12:17 +00:00
kazu
7cb1d35e23 * object.c (sym_to_proc): new method Symbol#to_proc; backported from 1.9. bug#19012
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13 07:02:24 +00:00
gotoyuzo
d3557aa349 * lib/webrick/httpservlet/filehandler.rb: should normalize path
separators in path_info to prevent directory traversal
  attacks on DOSISH platforms.
  reported by Digital Security Research Group [DSECRG-08-026].

* lib/webrick/httpservlet/filehandler.rb: pathnames which have
  not to be published should be checked case-insensitively.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-03 14:32:03 +00:00
nobu
9343634c6d * test/ruby/test_bignum.rb (test_too_big_to_s): skips a test using too
large memory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29 17:44:15 +00:00
nobu
e811e5e472 * bignum.c (big2str_find_n1): check integer overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-29 17:35:11 +00:00
nobu
929223e720 * test/ruby/test_beginendblock.rb (test_begin_and_eval): add test for
http://sourceforge.net/mailarchive/message.php?msg_name=47B2FD16.6040408%40vvvvvv.sakura.ne.jp


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-20 17:30:07 +00:00
seki
633689f320 TestERBCore: import from erb-2.0.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 02:52:43 +00:00
kou
d7a4285e9d * lib/rss/rss.rb (RSS::VERSION), test/rss/test_version.rb, NEWS:
0.2.3 -> 0.2.4.

* lib/rss/maker.rb, lib/rss/maker/, test/rss/test_maker_2.0.rb:
  fixed a bug that RSS::Maker.make("0.9")'s item doesn't make some
  elements if description is missed.
  Reported by Michael Auzenne. Thanks!!!

* lib/rss/maker/0.9.rb, test/rss/test_maker_0.9.rb:
  RSS::Maker.make("0.9") generates RSS 0.92 not RSS 0.91.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-11 08:26:47 +00:00
seki
4ee11189ff should find a symbol by Symbol class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-30 22:12:40 +00:00
kou
1f84e89cf4 * lib/rss/rss.rb, test/rss/test_version.rb, NEWS: 0.2.2 -> 0.2.3.
* lib/rss/parser.rb, test/rss/test_parser.rb: supported "-" in tag name.
  Reported by Ray Chen. Thanks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 04:23:09 +00:00
nobu
cfcde86709 * test/ruby/test_integer.rb (test_Integer): multiple underscores
should not be allowed after octal prefix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19 02:08:59 +00:00
nobu
2bd1fa4ace * bignum.c (rb_cstr_to_inum): an underscore succeeding after octal
prefix is allowed.  [ruby-core:14139]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19 01:52:31 +00:00
akr
1cac3e5640 catch EOFError in a thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15 11:12:20 +00:00
knu
b0388e77e3 * array.c (rb_ary_slice_bang): If an invalid negative index (<=
-size) is given, do not raise an exception but return nil just
  like slice() does.

* test/ruby/test_array.rb (TestArray::test_slice,
  TestArray::test_slice!): Pull in test cases from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-10 15:08:31 +00:00
akr
7cee87c6f2 new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05 09:39:25 +00:00
kou
6b42073a34 * lib/rss/rss.rb, test/rss/test_version.rb, NEWS: 0.2.1 -> 0.2.2.
* lib/rss/maker/itunes.rb: fixed new_itunes_category.
* lib/rss/maker/taxonomy.rb: new_taxo_topic -> new_topic because
  of consistency.

* test/rss/test_maker_itunes.rb, test/rss/test_itunes.rb: removed
  needless UTF-8 characters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-02 06:51:07 +00:00
kou
d731c29b06 * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.0 -> 0.2.1.
* lib/rss/content.rb, lib/rss/content/1.0.rb,
  lib/rss/content/2.0.rb, lib/rss/maker/content.rb,
  test/rss/rss-testcase.rb, test/rss/test_content.rb,
  test/rss/test_maker_content.rb: supported content:encoded with RSS 2.0.
  Suggested by Sam Lown. Thanks.

* NEWS: added the above changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 12:56:33 +00:00
akr
42ca6d707a pathname test backported.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13 15:03:43 +00:00
seki
a6157194a6 Improving with multiple network interface.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-01 14:52:33 +00:00