* proc.c (method_super_method): new method Method#super_method,
which returns a method object of the method to be called by
`super` in the receiver method object.
[ruby-core:62202] [Feature #9781]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c (bind_receiver): new method to return the bound receiver
of the binding object. [ruby-dev:47613] [Feature #8779]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
syck-1.0.3 gem support this imcompatible changes.
This reverts commit r46102
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
zzak is not the maintainer of yaml.
This reverts commit r46097.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c (math_atan2): return values like as expected by C99 if
both two arguments are infinity. based on the patch by cremno
phobia <cremno AT mail.ru> in [ruby-core:62310]. [Feature #9799]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c (math_log): check domain of base argument too. raises
Math::DomainError instead of returning NaN if the base is less
than 0, and returns NaN instead of -infinity if both of two
arguments are 0. [ruby-core:62309] [Bug #9797]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c (hash_pos): use bitwise AND to avoid slow modulo op
(new_size): power-of-two sizes for hash_pos change
(st_numhash): adjust for common keys due to lack of prime modulo
[Feature #9425]
* hash.c (rb_any_hash): right shift for symbols
* benchmark/bm_hash_aref_miss.rb: added to show improvement
* benchmark/bm_hash_aref_sym_long.rb: ditto
* benchmark/bm_hash_aref_str.rb: ditto
* benchmark/bm_hash_aref_sym.rb: ditto
* benchmark/bm_hash_ident_num.rb: added to prevent regression
* benchmark/bm_hash_ident_obj.rb: ditto
* benchmark/bm_hash_ident_str.rb: ditto
* benchmark/bm_hash_ident_sym.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
optional argument.
(nmin_cmp): New function.
(nmin_block_cmp): Ditto
(nmin_filter): Ditto.
(nmin_i): Ditto.
(nmin_run): Ditto.
(enum_min): Call nmin_run if the optional argument is given.
(nmin_max): Ditto.
(nmin_min_by): Ditto.
(nmin_max_by): Ditto.
* range.c: Range#{min,max} extended to take an optional argument.
(range_min): Call range_first if the optional argument is given.
(range_max): Call rb_call_super if the optional argument is given.
[ruby-core:57111] [Feature #8887]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* doc/NEWS-2.1.0: moved from NEWS
* doc/ChangeLog-2.1.0: moved ChangeLog older than created ruby_2_0_0 branch
* NEWS: NEWS for 2.2.0 that describes changes since 2.1.0
* ChangeLog: ChangeLog since created v2_1_0_rc1 tag (branch point of ruby_2_1 branch)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* 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
* 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
* 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
simultaneously.
I will introduce special care for internal events later.
* ext/-test-/tracepoint/tracepoint.c: test this behavior.
* test/-ext-/tracepoint/test_tracepoint.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc and rubygems are preview 2
* objspace is compatible changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: Improve grammar on change to Timeout
Patched by @srawlins in https://github.com/ruby/ruby/pull/440
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(TSort.tsort_each): Extracted from TSort#tsort_each.
(TSort.strongly_connected_components): Extracted from
TSort#strongly_connected_components.
(TSort.each_strongly_connected_component): Extracted from
TSort#each_strongly_connected_component.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ObjectSpace::trace_object_allocations_start
* ObjectSpace::trace_object_allocations_stop
* ObjectSpace::trace_object_allocations_clear
And some refactoring.
* test/objspace/test_objspace.rb: add a test for new methods.
* NEWS: add a description for new methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fixed installing platform gems
Restored concurrent requires
Fixed installing gems with extensions with --install-dir
Fixed `gem fetch -v` to install the latest version
Fixed installing gems with "./" in their files entries
* test/rubygems/test_gem_package.rb: Tests for the above.
* NEWS: Updated for RubyGems 2.1.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (num_step): Default the limit argument to infinity and
allow it to be omitted. Keyword arguments (by: and to:) are
introduced for ease of use. [Feature #8838] [ruby-dev:47662]
[ruby-dev:42194]
* numeric.c (num_step): Optimize for infinite loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
defined methods, not the methods/procs themselves.
[ruby-dev:42151] [Feature #3753]
* NEWS: documents about above change and def-expr (see r42337).
* test/ruby/test_module.rb: tests about above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
Fix wrong number of arguments. Document says "an array of the
entity declaration" but it passes two or more arguments.
This is a bug but it break backward compatibility.
Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582]
* lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto.
The listener template accepted two arguments.
* test/rexml/parser/test_sax2.rb: Add tests for external ID case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is accepted in the meeting:
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809
This method is accepted as a CRuby feature.
I.e. Other Ruby implementations don't need to implement it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e