Age | Commit message (Collapse) | Author |
|
This uses the RCLASS_SUPERCLASSES array to quickly find the next
SUPERCLASS of klass which is a T_CLASS.
Notes:
Merged: https://github.com/ruby/ruby/pull/5850
|
|
Treats:
#Array
#Hash
#String
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5784
|
|
|
|
|
|
Method references is not only able to be marked up as code, also
reflects `--show-hash` option.
The bug that prevented the old rdoc from correctly parsing these
methods was fixed last month.
|
|
* Repair format of What's Here sections in object.c
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
This reverts commit 29b68b89a0c0ea7de46c058fab746550398151f0.
Notes:
Merged: https://github.com/ruby/ruby/pull/5678
|
|
This uses the RCLASS_SUPERCLASSES array to quickly find the next
SUPERCLASS of klass which is a T_CLASS.
Notes:
Merged: https://github.com/ruby/ruby/pull/5662
|
|
This uses the superclass table recently introduced to implement fast
inheritance checking between classes (ex. Foo < Bar).
This is almost identical to what we do in class_search_class_ancestor
(as called by rb_obj_is_kind_of) except that we are checking both
directions: ie. both whether Foo < Bar and whether Bar < Foo.
Notes:
Merged: https://github.com/ruby/ruby/pull/5628
|
|
Calling rb_obj_is_kind_of with an ICLASS returns the same result as
calling it with the ICLASS's original Module.
Most of the time we encounter an ICLASS here checking the validity of a
protected method or super call, which we expect to return true (or raise
a slow exception anyways). We can take advantage of this by performing a
fast class inheritance check on the ICLASS's "includer" in hopes that it
returns true.
If the includer class check returns false we still have to fallback to
the full inheritance chain scan for the module's inclusion, but this
should be less common.
Notes:
Merged: https://github.com/ruby/ruby/pull/5642
|
|
This reverts commit 1b15756d24c11ed6bfddb5ae53402a071a20ea97.
Notes:
Merged: https://github.com/ruby/ruby/pull/5639
|
|
Calling rb_obj_is_kind_of with an ICLASS returns the same result as
calling it with the ICLASS's original Module.
Most of the time we encounter an ICLASS here checking the validity of a
protected method or super call, which we expect to return true (or raise
a slow exception anyways). We can take advantage of this by performing a
fast class inheritance check on the ICLASS's "includer" in hopes that it
returns true.
If the includer class check returns false we still have to fallback to
the full inheritance chain scan for the module's inclusion, but this
should be less common.
Notes:
Merged: https://github.com/ruby/ruby/pull/5619
|
|
Previously when checking ancestors, we would walk all the way up the
ancestry chain checking each parent for a matching class or module.
I believe this was especially unfriendly to CPU cache since for each
step we need to check two cache lines (the class and class ext).
This check is used quite often in:
* case statements
* rescue statements
* Calling protected methods
* Class#is_a?
* Module#===
* Module#<=>
I believe it's most common to check a class against a parent class, to
this commit aims to improve that (unfortunately does not help checking
for an included Module).
This is done by storing on each class the number and an array of all
parent classes, in order (BasicObject is at index 0). Using this we can
check whether a class is a subclass of another in constant time since we
know the location to expect it in the hierarchy.
Notes:
Merged: https://github.com/ruby/ruby/pull/5568
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5568
|
|
Clarifies security vulnerabilities for commands.
Treats:
Kernel.system
Kernel.` (backtick)
IO.popen
IO.read
IO.write
IO.binread
IO.binwrite
IO.readlines
IO.foreach
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
|
|
I used this regex:
(?<=\[)#(?:class|module)-([A-Za-z]+)-label-([A-Za-z0-9\-\+]+)
And performed a global find & replace for this:
rdoc-ref:$1@$2
Notes:
Merged: https://github.com/ruby/ruby/pull/5530
|
|
I used this regex:
([A-Za-z]+)\.html#(?:class|module)-[A-Za-z]+-label-([A-Za-z0-9\-\+]+)
And performed a global find & replace for this:
rdoc-ref:$1@$2
Notes:
Merged: https://github.com/ruby/ruby/pull/5530
|
|
[Feature #17881]
Works similarly to `method_added` but for constants.
```ruby
Foo::BAR = 42 # call Foo.const_added(:FOO)
class Foo::Baz; end # call Foo.const_added(:Baz)
Foo.autoload(:Something, "path") # call Foo.const_added(:Something)
```
Notes:
Merged: https://github.com/ruby/ruby/pull/4521
|
|
This is to allow Module subclasses that include modules before
calling super in the subclass's initialize.
Remove rb_module_check_initializable from Module#initialize.
Module#initialize only calls module_exec if a block is passed,
it doesn't have other issues that would cause problems if
called multiple times or with an already initialized module.
Move initialization of super to Module#allocate, though I'm not
sure it is required there. However, it's needed to be removed
from Module#initialize for this to work.
Fixes [Bug #18292]
Notes:
Merged: https://github.com/ruby/ruby/pull/5398
|
|
Has been deprecated since ebff9dc10e6e72239c23e50acc7d3cbfdc659e7a.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5385
|
|
Already these had been announced to be removed in 3.2.
Notes:
Merged: https://github.com/ruby/ruby/pull/5348
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5309
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5228
|
|
Implements [Feature #18273]
Returns an array containing the receiver's direct subclasses without
singleton classes.
Notes:
Merged: https://github.com/ruby/ruby/pull/5045
|
|
This provides a significant speedup for symbol, true, false,
nil, and 0-9, class/module, and a small speedup in most other cases.
Speedups (using included benchmarks):
:symbol :: 60%
0-9 :: 50%
Class/Module :: 50%
nil/true/false :: 20%
integer :: 10%
[] :: 10%
"" :: 3%
One reason this approach is faster is it reduces the number of
VM instructions for each interpolated value.
Initial idea, approach, and benchmarks from Eric Wong. I applied
the same approach against the master branch, updating it to handle
the significant internal changes since this was first proposed 4
years ago (such as CALL_INFO/CALL_CACHE -> CALL_DATA). I also
expanded it to optimize true/false/nil/0-9/class/module, and added
handling of missing methods, refined methods, and RUBY_DEBUG.
This renames the tostring insn to anytostring, and adds an
objtostring insn that implements the optimization. This requires
making a few functions non-static, and adding some non-static
functions.
This disables 4 YJIT tests. Those tests should be reenabled after
YJIT optimizes the new objtostring insn.
Implements [Feature #13715]
Co-authored-by: Eric Wong <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Co-authored-by: Yusuke Endoh <[email protected]>
Co-authored-by: Koichi Sasada <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/5002
Merged-By: jeremyevans <[email protected]>
|
|
[Feature #18344] (#5133)
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Doesn't include receiver or singleton classes.
Implements [Feature #14394]
Co-authored-by: fatkodima <[email protected]>
Co-authored-by: Benoit Daloze <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/4974
Merged-By: jeremyevans <[email protected]>
|
|
instead
Refinement#import_methods imports methods from modules.
Unlike Module#include, it copies methods and adds them into the refinement,
so the refinement is activated in the imported methods.
[Bug #17429] [ruby-core:101639]
|
|
When YJIT make calls to routines without reconstructing interpreter
state through jit_prepare_routine_call(), it relies on the routine to
never allocate, raise, and push/pop control frames. Comment about this
on the routines that YJTI calls.
This is probably something we should dynamically verify on debug builds.
It's hard to statically verify this as it requires verifying all
functions in the call tree. Maybe something to look at in the future.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4858
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4858
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4821
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4805
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Must not be a bad idea to improve documents. [ci skip]
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4695
Merged-By: nobu <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4684
|
|
|
|
|
|
|