summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2014-01-10test_super.rb: remove unneeded codenobu
* test/ruby/test_super.rb (test_missing_super_in_module_unbound_method): binding target does not need extending. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10insns.def: add opt path for Hash#[] and Hash#[]= used with str literal keystmm1
* insns.def (opt_aref_with): new instruction to optimize Hash#[], removing any allocation overhead when used with a string literal key. Patch by normalperson (Eric Wong). [ruby-core:59640] [Bug #9382] * insns.def (opt_aset_with): new instruction to optimize Hash#[]= * compile.c (iseq_compile_each): compiler shortcuts for new instructions * hash.c (static VALUE rb_hash_compare_by_id_p): fix documentation for Hash#compare_by_identity to reflect frozen string sharing * test/ruby/test_hash.rb (class TestHash): test for new behavior git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09* vm.c (rb_vm_pop_cfunc_frame): added. It cares c_return event.ko1
The patch base by drkaes (Stefan Kaes). [Bug #9321] * variable.c (rb_mod_const_missing): use rb_vm_pop_cfunc_frame() instead of rb_frame_pop(). * vm_eval.c (raise_method_missing): ditto. * vm_eval.c (rb_iterate): ditto. * internal.h (rb_vm_pop_cfunc_frame): add decl. * test/ruby/test_settracefunc.rb: add tests. provided by drkaes (Stefan Kaes). * vm.c, eval.c, include/ruby/intern.h (rb_frame_pop): move definition of rb_frame_pop() and deprecate it. It doesn't care about `return' events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08vm_insnhelper.c: revive r44455 for bound module methodnobu
* vm_insnhelper.c (vm_search_super_method): when super called in a bound UnboundMethod generated from a module, no superclass is found since the current defined class is the module, then call method_missing in that case. [ruby-core:59619] [Bug #9377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08object.c: hash value from objid with saltnobu
* hash.c (rb_objid_hash): return hash value from object ID with a salt, extract from rb_any_hash(). * object.c (rb_obj_hash): return same value as rb_any_hash(). fix r44125. [ruby-core:59638] [Bug #9381] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06array.c: return first unique element in Array#uniqtmm1
* array.c (ary_add_hash): Fix consistency issue between Array#uniq and Array#uniq! [Bug #9340] [ruby-core:59457] * test/ruby/test_array.rb (class TestArray): regression test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06test_super.rb: test_module_super_in_method_modulenobu
* test/ruby/test_super.rb (test_module_super_in_method_module): more test for the case searching super method from a method defined in a module. [ruby-core:59589] [Bug #9315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-05* compar.c (cmp_equal): remove error hiding in Comparable#==.eregon
Comparable#== no longer rescues exceptions silently. This was the cause of quite a couple bugs. See #7688. [EXPERIMENTAL] * test/ruby/test_comparable.rb: adapt assertion to match new behavior. * lib/rdoc/method_attr.rb: fix bugs discovered by this change. * test/rdoc/test_rdoc_normal_class.rb: fix bugs in tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04* struct.c (rb_struct_set): return assigned value from setter methodcharliesome
rather than struct object. [Bug #9353] [ruby-core:59509] * test/ruby/test_struct.rb (test_setter_method_returns_value): add test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04test/ruby/test_gc.rb: use GC.stat(:key) instead of GC.statkazu
* test/ruby/test_gc.rb (TestGc#test_latest_gc_info): use GC.stat(:key) instead of GC.stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01test_transcode.rb: add messagesnobu
* test/ruby/test_transcode.rb (test_valid_dummy_encoding): add assertion messages and suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-31eval.c: raise with causenobu
* eval.c (rb_f_raise): add cause: optional keyword argument. [ruby-core:58610] [Feature #8257] [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-30encoding.c: mask dummy flagsnobu
* encoding.c (must_encindex, rb_enc_from_index, rb_obj_encoding): mask encoding index and ignore dummy flags. [ruby-core:59354] [Bug #9314] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28test_sprintf.rb: sprintf with a hash as parameternobu
* test/ruby/test_sprintf.rb (test_hash): Added tests for sprintf with a hash as parameter. [Fixes GH-491] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28vm_insnhelper.c: missing super in method modulenobu
* vm_insnhelper.c (vm_search_super_method): direct superclass of a module is found when super called in a Method object generated a method defined in a module, call method_missing in that case. [ruby-core:59358] [Bug #9315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27parse.y: save cmdarg_stack in local scopenobu
* parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to isolate command argument state from outer scope. [ruby-core:59342] [Bug #9308] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26hash.c: remove dead codenobu
* hash.c (rb_hash_reject): remove dead code for the deprecated behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25* proc.c: Having any mandatory keyword argument increases min arity [#9299]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25* proc.c: Having optional keyword arguments makes maximum arity +1, not ↵marcandre
unlimited [#8072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25compile.c: unnamed keyword rest checknobu
* compile.c (iseq_set_arguments): set arg_keyword_check from nd_cflag, which is set by parser. internal ID is used for unnamed keyword rest argument, which should be separated from no keyword check. * iseq.c (rb_iseq_parameters): if no keyword check, keyword rest is present. * parse.y (new_args_tail_gen): set keywords check to nd_cflag, which equals to that keyword rest is not present. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25test_keyword.rb: suppress warningsnobu
* test/ruby/test_keyword.rb (test_block_required_keyword): suppress shadowing outer variable warning. * test/ruby/test_keyword.rb (test_precedence_of_keyword_arguments): suppress unused variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25iseq.c: fix parameter of unnamed rest keywords argumentnobu
* iseq.c (rb_iseq_parameters): push argument type symbol only for unnamed rest keywords argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25proc.c: fix arity of rest keywords argumentnobu
* proc.c (rb_iseq_min_max_arity): maximum argument is unlimited if having rest keywords argument. [ruby-core:53298] [Bug #8072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25test_method.rb, test_proc.rb: suppress warningsnobu
* test/ruby/test_method.rb: suppress warnings in verbose mode. * test/ruby/test_proc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25* vm_insnhelper.c (argument_error): insert dummy frame to makeko1
a backtrace object intead of modify backtrace string array. [Bug #9295] * test/ruby/test_backtrace.rb: add a test for this patch. fix test to compare a result of Exception#backtrace with a result of Exception#backtrace_locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25test_rubyoptions.rb: remove corenobu
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): run SEGV test in a temproray directory so that core files may not be left, not to confuse chkbuild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24test_variable.rb: fix testnobu
* test/ruby/test_variable.rb (test_binding_local_variables): adjust local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24proc.c: Binding#local_variablesnobu
* proc.c (bind_local_variables): allowing binding to list its local variables. patch by Jack Danger Canty <jackdanger AT squareup.com> at [ruby-core:56543]. [Feature #8773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24test_method.rb: fix testnobu
* test/ruby/test_method.rb (test_define_method_in_private_scope): remove extra *, to get the argument itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24proc.c: make method by define_method publicnobu
* proc.c (rb_mod_define_method): consider visibility only if self in the caller is same as the receiver, otherwise make public as well as old behavior. [ruby-core:57747] [Bug #9005] [ruby-core:58497] [Bug #9141] * vm.c (rb_vm_cref_in_context): return ruby level cref if self is same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24assertions.rb: assert_thrownobu
* lib/test/unit/assertions.rb (assert_throw): make an alias of assert_throws. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24test_alias.rb: rename duplicate namenobu
* test/ruby/test_alias.rb (test_alias_wb_miss): rename duplicate name to get rid of redefinition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23hash.c: reduce warningnobu
* hash.c (HAS_EXTRA_STATES): warn extra states only when something differ. [ruby-core:59254] [Bug #9275] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23test_hash.rb: suppress warningsnobu
* test/ruby/test_hash.rb (test_rehash2, test_callcc_iter_level): suppress shadowing outer local variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23envutil.rb: use EXEEXTnobu
* test/ruby/envutil.rb (rubybin): use EXEEXT configured value instead of the hard coded suffix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23* array.c: Have to_h raise on elements that are not key-value pairs [#9239]marcandre
* enum.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22* doc/ChangeLog-1.9.3: [DOC] Fix typos by @dvsureshzzak
[Fixes GH-485] https://github.com/ruby/ruby/pull/485 * ext/openssl/ossl_config.c: ditto * lib/rss/utils.rb, lib/time.rb: ditto * test/ruby/envutil.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20Fix typo in testsa_matsuda
* test/ruby/test_proc.rb: s/overriden/overridden/ * test/ruby/test_refinement.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19fix typonaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18test_gc.rb: fix syntax errornobu
* test/ruby/test_gc.rb (TestGc#test_expand_heap): fix syntax error by mismatched paren. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18test_gc.rb: refine assertionnobu
* test/ruby/test_gc.rb (test_expand_heap): use assert_in_delta instead of bare assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18test_io.rb: duplicated testnobu
* test/ruby/test_io.rb (test_s_write): merge duplicated test. * test/ruby/test_io.rb (test_io_s_write): remove duplicated assertsions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17* test/ruby/test_io.rb: fix duplicated test name.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17hash.c: revertnobu
* hash.c (rb_hash_reject): revert to deprecated behavior, with warnings, due to compatibility for HashWithDifferentAccess. [ruby-core:59154] [Bug #9223] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17vm_trace.c: isolate exceptionsnobu
* vm_trace.c (rb_postponed_job_flush): isolate exceptions in postponed jobs and restore outer ones. based on a patch by tarui. [ruby-core:58652] [Bug #9168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16test_process.rb: fix for 32bit platformsnobu
* test/ruby/test_process.rb (test_clock_gettime_unit): results can exceed Fixnum limit, especially on 32bit platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16class.c: fix option hashnobu
* class.c (rb_scan_args): if no keywords is given return nil as the option hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16test_io.rb: IO.write testnobu
* test/ruby/test_io.rb (test_s_write): test for IO.write. more conditions will be needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* vm_method.c (rb_method_entry_make): fix WB miss.ko1
Note that rb_method_entry_t::klass is not constified. We may constify this field. * test/ruby/test_alias.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e