summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2013-12-08class.c, vm_insnhelper.c: check unknown keywordsnobu
* class.c (rb_get_kwargs): if optional is negative, unknown keywords are allowed. * vm_insnhelper.c (vm_callee_setup_keyword_arg): check unknown keywords. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08test_keyword.rb: check error messagesnobu
* test/ruby/test_keyword.rb (test_required_keyword): check also error messages. * test/ruby/test_keyword.rb (test_block_required_keyword): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08* array.c (rb_ary_shuffle_bang, rb_ary_sample): checkktsj
unknown keywords. * test/ruby/test_array.rb (test_shuffle, test_sample): tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08vm.c: add RubyVM.stat for accessing cache serialstmm1
* vm.c (ruby_vm_stat): add RubyVM.stat() for access to internal cache counters. this methods behaves like GC.stat, accepting an optional hash or symbol argument. [Bug #9190] [ruby-core:58750] * test/ruby/test_rubyvm.rb: test for new method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08hash.c: revert r43870 and add alternative parser patch for literal keystmm1
* hash.c (hash_aset_str): revert r43870 due to performance issue [Bug #9188] [ruby-core:58730] * parse.y (assoc): convert literal string hash keys to fstrings * test/ruby/test_hash.rb (class TestHash): expand test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08parse.y: use rb_fstring() for strings stored in the symbol tabletmm1
* parse.y (register_symid_str): use fstrings in symbol table [Bug #9171] [ruby-core:58656] * parse.y (rb_id2str): ditto * string.c (rb_fstring): create frozen_strings on first usage. this allows rb_fstring() calls from the parser (before cString is created) * string.c (fstring_set_class_i): set klass on fstrings generated before cString was defined * string.c (Init_String): convert frozen_strings table to String objects after boot * ext/-test-/symbol/type.c (bug_sym_id2str): expose rb_id2str() * test/-ext-/symbol/test_type.rb (module Test_Symbol): verify symbol table entries are fstrings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08* lib/rubygems: Update to RubyGems master 14749ce. This fixes bugsdrbrain
handling of gem dependencies lockfiles (Gemfile.lock). * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07hash.c: rb_hash_reject without dupnobu
* hash.c (rb_hash_reject): copy unrejected elements only to new hash, so that the change on the original receiver can affect. [ruby-core:58914] [Bug #9223] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07test_struct.rb: use assert_samenobu
* test/ruby/test_struct.rb (test_question_mark_in_member): true value has no meanings itself. use assert_same instead. * test/ruby/test_struct.rb (test_bang_mark_in_member): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07test_struct.rb: use assert_predicatenobu
* test/ruby/test_struct.rb (test_question_mark_in_member): assert_true is a method in test-unit. use assert_predicate instead. * test/ruby/test_struct.rb (test_bang_mark_in_member): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06* test/ruby/test_struct.rb: Add regression test for question marks andcharliesome
bangs in struct members. [Closes GH-468] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06gc.c: add minor marking and lazy sweeping options to GC.starttmm1
* gc.c (gc_start_internal): GC.start() now accepts two optional keyword arguments. These can be used to disable full_mark (minor mark only) or disable immediate_sweep (use lazy sweep). These new options are useful for benchmarking GC behavior, or performing minor GC out-of-band. * test/ruby/test_gc.rb (class TestGc): tests for new options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec):mrkn
treat 0.0 and -0.0 of floating-point numbers specially for an optimization and to correctly propagate its signbit to the result. [Bug #9214] [ruby-core:58858] * test/bigdecimal/test_bigdecimal.rb: add tests case for the above change. * test/bigdecimal/test_bigdecimal_util.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_objspace.rb: show errornobu
* test/objspace/test_objspace.rb (test_dump_all): show error output if nothing dumped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05array.c: prefer lhs elementsnobu
* array.c (rb_ary_or): lhs elements are prefered, so should not replace with rhs elements. * test/ruby/test_array.rb (test_OR_in_order): import the test failed by r43969 from rubyspec/core/array/union_spec.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_gc.rb: expand timeoutnobu
* test/ruby/test_gc.rb (test_sweep_in_finalizer): expand timeout for slower machines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: add GC.latest_gc_info()tmm1
* gc.c (struct rb_objspace): rename internal last_collection_flags to latest_gc_info * gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar behavior to GC.stat() * gc.c (rb_gc_latest_gc_info): new c-api for above * gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat * gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags * include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about new api * gc.c (gc_stat_internal): raise TypeError on wrong type * gc.c (gc_stat): fix error message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05ext/objspace: remove OS.after_gc_start_hook= and move internal testtmm1
* ext/objspace/gc_hook.c: remove this file * ext/-test-/tracepoint/gc_hook.c: new filename for above * ext/objspace/objspace.c: remove ObjectSpace.after_gc_start_hook= * test/objspace/test_objspace.rb: remove test * test/-ext-/tracepoint/test_tracepoint.rb: add above test for tracepoint re-entry git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: expose GC.stat() to C-api via rb_gc_stat()tmm1
* include/ruby/intern.h: add rb_gc_stat() for access to GC.stat variables from c-api * gc.c (rb_gc_stat): new c-api method. accepts either VALUE hash like GC.stat, or VALUE symbol key and returns size_t directly. the second form is useful to avoid allocations, i.e. for usage inside INTERNAL_EVENT_GC tracepoints. * gc.c (gc_stat): add GC.stat(:key) to return single value instead of hash * gc.c (gc_stat_internal): helper method to retrieve single or all stat values * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about this new api git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_hash.rb: import tests from rubyspecnobu
* test/ruby/test_hash.rb: import tests for recursive hash values from rubyspec/core/{array,hash}/hash_spec.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_hash.rb: move testsnobu
* test/ruby/test_hash.rb: move hash value tests from test_array.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_gc.rb: shortennobu
* test/ruby/test_gc.rb (test_sweep_in_finalizer): omit iteration number to 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: split GC_END event into GC_END_MARK and GC_END_SWEEPtmm1
* include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with two new events: GC_END_MARK and GC_END_SWEEP * gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done * gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark * ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests for new events. * test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj): ditto. * NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample, and will be removed before ruby 2.1. * ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook= git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: flush all deferred finalizersnobu
* gc.c (finalize_deferred): flush all deferred finalizers while other finalizers can get ready to run newly by lazy sweep. [ruby-core:58833] [Bug #9205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04* test/ruby/test_array.rb (test_recursive_hash_value): rename.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-04delegate.rb: ignore unset targetnobu
* lib/delegate.rb (Delegator#method_missing): ignore the target if not set, and delegate to global methods. [ruby-core:58572] [Bug #9155] * lib/delegate.rb (Delegator#respond_to_missing): ditto. * lib/delegate.rb (SimpleDelegator#__getobj__): yield and return if not delegated but a block is given, like as Hash#fetch. * lib/delegate.rb (DelegateClass#__getobj__): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03hash.c: same hash value for similar constructsnobu
* hash.c (rb_hash_recursive): make similar (recursive) constructs return same hash value. execute recursively, and rewind to the topmost frame with an object which .eql? to the recursive object, if recursion is detected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03hash.c: detect recursion for allnobu
* hash.c (rb_hash): detect recursion for all `hash' methods. each `hash' methods no longer need to use rb_exec_recursive(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* test/ruby/test_rubyoptions.rb (TestRubyOptions::SEGVTest::ExpectedStderr):nobu
ignore fault address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* array.c (ary_add_hash): set and return values because string keysglass
will be frozen. [ruby-core:58809] [Bug #9202] * array.c (rb_ary_uniq_bang): ditto. * array.c (rb_ary_or): ditto. * array.c (rb_ary_uniq): ditto. * test/ruby/test_array.rb: tests for above. The patch is from normalperson (Eric Wong). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* ext/openssl/lib/openssl/buffering.rb: Return ASCII-8BIT strings fromdrbrain
SSLSocket methods. [ruby-trunk - Bug #9028] * test/openssl/test_ssl.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03* lib/rdoc: Update to RDoc master 900de99. Changes include:drbrain
Fixed documentation display of constants Fixed handling of unknown parsers * test/rdoc: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-02* hash.c (rb_hash_rehash): make temporary st_table under the controlglass
of GC. [Bug #9187] * test/ruby/test_hash.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-02* lib/net/smtp.rb (Net::SMTP#critical): Always return adrbrain
Net::SMTP::Response. Patch by Pawel Veselov. [ruby-trunk - Bug #9125] * test/net/smtp/test_smtp.rb: Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-01* lib/rubygems: Update to RubyGems master baa965b. Notable changes:drbrain
Copy directories to lib/ when installing extensions. This completes the fix for [ruby-trunk - Bug #9106] * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-01* test/ruby/test_case.rb (test_nomethoderror):sorah
Add test related to r43913, r43914 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30* lib/rubygems: Update to RubyGems master 66e5c39. Notable changes:drbrain
Implement gem.deps.rb (Gemfile) .lock support Fixed `gem uninstall` for a relative directory in GEM_HOME. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30* test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consumingtmm1
free slots to fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30dir.c: check unknown keywordsnobu
* dir.c (dir_initialize): check unknown keywords. [ruby-dev:47152] [Bug #8060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30eval.c: determine exit status and signal before finalizationnobu
* eval.c (ruby_cleanup): determine exit status and signal to terminate before finalization, to get rid of access destroyed T_DATA execption object. [ruby-core:58643] [Bug #9167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30enumerator.c: should not store local variable addressnobu
* enumerator.c (enumerator_with_index): should not store local variable address to memoise the arguments. it is invalidated after the return. [ruby-core:58692] [Bug #9178] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30siphash.c: fix missing conditionnobu
* siphash.c (sip_hash24): fix for aligned word access little endian platforms. [ruby-core:58658] [Bug #9172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30vm_eval.c: blockargnobu
* vm_eval.c (rb_yield_block): implement non-nil block argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30range.c: revert the old behaviornobu
* range.c (range_each): revert the old behavior, no block is given to the yielded block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29* lib/webrick/httpauth/digestauth.rb: Fix typo in an error message.a_matsuda
* test/ruby/test_parse.rb: Fix typo in a test name. s/allowd/allowed/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29* test/ruby/test_case.rb (test_method_missing): Test for r43913.sorah
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28* gc.c: Expose details about last garbage collection via GC.stat.tmm1
* gc.c (gc_stat): Add :last_collection_flags for reason/trigger/type of last GC run. * gc.c (gc_prof_sweep_timer_stop): Record HAVE_FINALIZE GPR even without GC_PROFILE_MORE_DETAIL. * gc.c (gc_profile_flags): Add GC::Profiler.decode_flags to make sense of GC.stat[:last_collection_flags] * test/ruby/test_gc.rb (class TestGc): Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* test/ruby/test_gc.rb (class TestGc): Fix warning intmm1
test_expand_heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* gc.c (Init_GC): Add new GC::INTERNAL_CONSTANTS for information abouttmm1
GC heap/page/slot sizing. * test/ruby/test_gc.rb (class TestGc): test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* gc.c (gc_stat): add new information heap_eden_page_length andko1
heap_tomb_page_length. * test/ruby/test_gc.rb: fix to use GC.stat[:heap_eden_page_length] instead of GC.stat[:heap_length]. This test expects `heap_eden_page_length' (used pages size). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e