Age | Commit message (Collapse) | Author |
|
[Feature #16103]
Close: https://github.com/ruby/ruby/pull/2267
|
|
`umethod.bind_call(obj, ...)` is semantically equivalent to
`umethod.bind(obj).call(...)`. This idiom is used in some libraries to
call a method that is overridden. The added method does the same
without allocation of intermediate Method object. [Feature #15955]
```
class Foo
def add_1(x)
x + 1
end
end
class Bar < Foo
def add_1(x) # override
x + 2
end
end
obj = Bar.new
p obj.add_1(1) #=> 3
p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2
p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2
```
|
|
These tests were guarded by a RUBY_ENGINE of "ruby" even though they test an official Ruby feature (pread/pwrite added in Ruby 2.5). This commit moves them to the top level of the test case so they will run on other implementations.
Notes:
Merged: https://github.com/ruby/ruby/pull/2412
|
|
Fixes [Bug #11326]
|
|
|
|
[feature #16035]
This goes one step farther than what nobu did in [feature #13498]
With this patch, special objects such as static symbols, integers, etc can be used as either key or values inside WeakMap. They simply don't have a finalizer defined on them.
This is useful if you need to deduplicate value objects
Notes:
Merged: https://github.com/ruby/ruby/pull/2313
|
|
[Feature #16103]
|
|
This reverts commits:
* d365fd5a024254d7c105a62a015a7ea29ccf3e5d
* d780c3662484d6072b3a6945b840049de72c2096
* aa7211836b769231a2a8ef6b6ec2fd0ec882ef29
* 043f010c28e82ea38978bf8ed885416f133b5b75
* bb4dd7c6af05c7821d572e2592ea3d0cc748d81f
* 043f010c28e82ea38978bf8ed885416f133b5b75
* f169043d81524b5b529f2c1e9c35437ba5bc3a7a
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
|
|
when reopened class/module redefinition mismatched the previous
definition. [Feature #11460]
|
|
|
|
This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3.
flip-flop is no longer deprecated.
[Feature #5400]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* It can invoke test-unit with envutil.rb
* refute_match of test-unit couldn't handle String instance.
|
|
|
|
To reproduce this bug, type one character into irb, then press the
delete key on your keyboard.
|
|
|
|
|
|
|
|
The extension for require method with rubygems affects this test
case. We need to keep this test for the original method.
|
|
This reverts commit 75d29db8f965893bb6ab38b9008abc80cdda246e.
|
|
[Bug #16107]
Notes:
Merged: https://github.com/ruby/ruby/pull/2373
|
|
This reverts commit 00cd5d74cecb6aa4a184e57e2b8246ef6e45d458.
|
|
https://github.com/rubygems/rubygems/pull/1868 changes the behavior
of require when it used with -I options. Therefore, the options of
ruby repository was different from rubygems/rubygems.
|
|
https://github.com/rubygems/rubygems/commit/c0275ee537
|
|
https://github.com/rubygems/rubygems/commit/bb02953a97
|
|
https://github.com/rubygems/rubygems/commit/7964917bbc
|
|
Gem::Command#show_lookup_failure with a parameter to suppress suggestions
https://github.com/rubygems/rubygems/commit/760b7d834f
|
|
https://github.com/rubygems/rubygems/commit/6fbda98eb3
|
|
https://github.com/rubygems/rubygems/commit/a6375920bf
|
|
For consistency with the other specs.
https://github.com/rubygems/rubygems/commit/44b93aec4c
|
|
https://github.com/ruby/rdoc/commit/f2c63549f7
|
|
|
|
|
|
The full scan of the C source code (`@content.scan`) is very slow.
The old code invokes the scan six times in `do_classes` and
`do_modules`.
This change integrates the six scans into one by merging the regexps.
The integrated regexp is a bit hard to maintain, but the speed up is
significant: approx. 30 sec -> 20 sec in Ruby's `make rdoc`.
In addition, this change omits `do_boot_defclass` unless the file name
is `class.c`. `boot_defclass` is too specific to Ruby's source code, so
RDoc should handle it as a special case.
Before this change:
TOTAL (pct) SAMPLES (pct) FRAME
858 (13.6%) 858 (13.6%) (garbage collection)
292 (4.6%) 264 (4.2%) RDoc::Parser::C#do_define_class
263 (4.2%) 250 (3.9%) RDoc::Parser::C#do_define_module
275 (4.3%) 241 (3.8%) RDoc::Parser::C#do_define_class_under
248 (3.9%) 237 (3.7%) RDoc::Parser::C#do_define_module_under
234 (3.7%) 234 (3.7%) RDoc::Parser::C#gen_body_table
219 (3.5%) 219 (3.5%) Ripper::Lexer#state_obj
217 (3.4%) 216 (3.4%) RDoc::Parser::C#do_struct_define_without_accessor
205 (3.2%) 205 (3.2%) RDoc::Parser::C#do_boot_defclass
205 (3.2%) 205 (3.2%) RDoc::Parser::C#do_singleton_class
The six methods take approx. 22.2%.
`do_define_class` (4.2%) + `do_define_class_under` (3.8%) +
`do_define_module` (3,9$) + `do_define_module_under` (3.7%) +
`do_struct_define_without_accessor` (3.4%) + `do_singleton_class` (3.2%)
After this change, the methods are integrated to `do_classes_and_modules`
which takes only 5.8%.
TOTAL (pct) SAMPLES (pct) FRAME
812 (16.7%) 812 (16.7%) (garbage collection)
355 (7.3%) 284 (5.8%) RDoc::Parser::C#do_classes_and_modules
225 (4.6%) 225 (4.6%) RDoc::Parser::C#gen_body_table
429 (8.8%) 210 (4.3%) RDoc::Parser::RubyTools#get_tk
208 (4.3%) 208 (4.3%) RDoc::TokenStream#add_tokens
|
|
|
|
|
|
|
|
standalone gem.
|
|
|