summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2014-03-28string.c: infect match resultnobu
* string.c (rb_pat_search): match result should be infected by the pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28string.c: backref substitutionnobu
* re.c (rb_reg_regsub): allow nil regexp for string matching. * string.c (rb_str_sub_bang, str_gsub): make substitution if replacement string has backref escapes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28string.c: unset $~ if unmatchnobu
* string.c (rb_pat_search): unset $~ if the last match failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-27string.c: search by rb_str_indexnobu
* re.c (match_regexp): set regexp for MatchData from string. * re.c (rb_backref_set_string): create MatchData from string and set backref. * string.c (rb_pat_search, rb_str_sub, rb_str_sub_bang, str_gsub), (scan_once, rb_str_scan, rb_str_partition): use rb_str_index instead of rb_reg_search() when pattern is a String. based on the patch by Sam Rawlins <sam.rawlins@gmail.com> [Fixes GH-579] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-27re.c: class name encodingnobu
* re.c (match_inspect): preserve class name encoding by PRIsVALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-27test_m17n_comb.rb: refine assertionsnobu
* test/ruby/test_m17n_comb.rb (test_str_scan): refine assertion messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26encoding.c: fix encoding of dynsymnobu
* encoding.c (rb_enc_get_index): the encoding of dynamic symbol comes from fstr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26encoding.c: enc_capable symbolnobu
* encoding.c (enc_capable): Symbol is now encoding capable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25parse.y: required kwarg without parenthesesnobu
* parse.y (parser_yylex): only a newline after label should be significant. [ruby-core:61658] [Bug #9669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25* test/ruby/test_time.rb: extended the timeout span and reduce the loop count.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25parse.y: required kwarg without parenthesesnobu
* parse.y (lex_state_e, parser_params, f_arglist, parser_yylex): separate EXPR_LABELARG from EXPR_BEG and let newline significant, so that required keyword argument can place at the end of argument list without parentheses. [ruby-core:61658] [Bug #9669] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25* test/ruby/test_time.rb: use portable time zone. see [ruby-core:61671] [Bug ↵usa
#9652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-24test_time.rb: arguments ordernobu
* test/ruby/test_time.rb (TestTime#test_marshal_zone_gc): fix the order of arguments. expected value should come first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-24Asia/Tokyo is more portable value for ENV["TZ"] [Bug #9652]naruse
FreeBSD doesn't accept "Japan". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-23vm_method.c: check if klass is 0nobu
* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0 for a method aliased in a module. [ruby-core:61636] [Bug #9663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-20vm_method.c: fix infinite recursionnobu
* vm_method.c (rb_method_entry_get_without_cache): get rid of infinite recursion at aliases in a subclass and a superclass. return actually defined class for other than singleton class. [ruby-core:60431] [Bug #9475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-19time.c: freeze and preserve marshal-loaded time zonenormal
We need to prevent vtm.zone from pointing to a GC-ed string buffer. The rb_copy_generic_ivar call misses it because get_attr deleted it. Thanks to nobu for the rb_str_new_frozen suggestion. * time.c (time_mload): freeze and preserve marshal-loaded time zone * test/ruby/test_time.rb: add test for GC on loaded object [Bug #9652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-18* vm_eval.c (eval_string_with_cref): Use file path even if scope issorah
given. Related to [ruby-core:56099] [Bug #8662] and r42103. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-17variable.c: avoid memory leak on const redefinitionnormal
* variable.c (rb_const_set): delete existing entry on redefinition [Bug #9645] * test/ruby/test_const.rb (test_redefinition): test for leak git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-13vm_insnhelper.c: relax arity checknobu
* vm.c (invoke_block_from_c): add splattable argument. * vm.c (vm_invoke_proc): disallow to splat when directly invoked. * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_callee_setup_arg): relax arity check of yielded lambda. [ruby-core:61340] [Bug #9605] * test/ruby/test_yield.rb (TestRubyYieldGen#emu_bind_params): no longer raise ArgumentError when splatting to lambda. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-12revert [Bug #9605]nobu
* enum.c: revert r45284, r45286, r45292. it conflicts with existing behaviors. [Bug #9605] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-12vm_insnhelper.c: disable fastpath if splatnobu
* vm_insnhelper.c (vm_callee_setup_arg): disable fastpath if splat argument, since argc may differ for each calls. [ruby-core:61422] [Bug #9622] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11insns.def (opt_regexpmatch2): respect redefined match opnormal
* insns.def (opt_regexpmatch2): respect redefined match op Thanks to Sam Rawlins for the fix. * test/ruby/test_string.rb: test based on Tsuyoshi Sawada's report [Bug #9581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11test_hash.rb: refine a testnobu
* test/ruby/test_hash.rb (test_exception_in_rehash): do not run twice since this test does not use @cls. making a hash may increase memory usage and should be in preparation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11envutil.rb: do not check RSS by defaultnobu
* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): do not check RSS by default, enabled by rss optional keyword argument. TestHash#test_exception_in_rehash sometimes fails otherwise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11r45298 fix trivial bugnaruse
$initial_size must be a size, not a status git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-10merge GH-558nobu
* test/ruby/test_enumerator.rb (test_iterators): fix test for hash iterators. [Fixes GH-558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-09test/ruby/envutil.rb: compare RSS to check memory leaknobu
* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): compare also RSS if available. * test/ruby/memory_status.rb (Memory::Status.parse): read string form of an instance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-07enum.c: yield multiple valuesnobu
* enum.c (find_i): yield multiple values instead of a packed array, so that lambda block can work. with tests by Alex Rothenberg. [ruby-core:61340] [Bug #9605] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-05* test/ruby: get rid of warnings.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-05parse.y: optional arguments in rhsnobu
* parse.y (f_arg_asgn): define optional arguments as argument variables in the rhs default expressions. [ruby-core:61299] [Bug #9593] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04* test/ruby/test_eval.rb (TestEval#make_test_binding): renamed.usa
it's not test method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04* test/ruby: get rid of warnings.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02* test/ruby/test_backtrace.rb: get rid of warnings. unused variable,usa
shadowing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-02fix the number of intro lines r44123naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-28numeric.c: float overflownobu
* numeric.c (ruby_num_interval_step_size): get rid of float conversion overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-28numeric.c: integer overflownobu
* numeric.c (ruby_num_interval_step_size): get rid of integer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-28* numeric.c: Fix Numeric#step with 0 unit [#9575]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-28* test_numeric: Strengthen tests on 64 bit platformsmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-27numeric.c: check signs before divisionnobu
* numeric.c (ruby_num_interval_step_size): check signs and get rid of implementation dependent behavior of negative division. [ruby-core:61106] [Bug #9570] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-26eval.c: preserve encodingnobu
* eval.c (setup_exception): preserve exception class name encoding in debug mode messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-26eval.c: preserve errinfonobu
* eval.c (setup_exception): preserve errinfo across calling #to_s method on the exception. [ruby-core:61091] [Bug #9568] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-26envutil.rb: move labeled_module and labeled_classnobu
* test/ruby/envutil.rb (labeled_module, labeled_class): move from test/ruby/test_module.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-25* string.c (sym_find): Add Symbol.find(str), which returns whether givennaruse
string is defined as symbol or not. [Feature #7854] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21class.c: do nothing if copying selfnobu
* class.c (rb_mod_init_copy): do nothing if copying self. [ruby-dev:47989] [Bug #9535] * hash.c (rb_hash_initialize_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-20* hash.c (rb_hash_flatten): fix behavior of flatten(0).glass
[ruby-dev:47988] [Bug #9533] * test/ruby/test_array.rb: test for above. patch is from Takeshi Sasaki. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-20* hash.c (rb_hash_flatten): fix behavior of flatten(-1).glass
[ruby-dev:47988] [Bug #9533] * test/ruby/test_array.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* test/ruby/test_gc.rb: ignore warning messages for running with -wko1
option such as chkbuild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17marshal.c: do not recycle wrapper objectsnobu
* marshal.c (marshal_dump, marshal_load): do not recycle wrapper objects, to prevent from segfault with continuation. [ruby-dev:47970] [Bug #9523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* gc.c: introduce new environment variableko1
"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC frequency. Do full GC when the number of old objects is more than R * N where R is this factor and N is the number of old objects just after last full GC. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e