| Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
classes
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2699
|
|
This issue was exposed by recent commits to better support including
refined modules.
Notes:
Merged: https://github.com/ruby/ruby/pull/2709
|
|
|
|
Instead of returning `nil`, raise a syntax error if its value is
used. [Feature #16355]
|
|
Asynchronous events such as signal trap, finalization timing,
thread switching and so on are managed by "interrupt_flag".
Ruby's threads check this flag periodically and if a thread
does not check this flag, above events doesn't happen.
This checking is CHECK_INTS() (related) macro and it is placed
at some places (laeve instruction and so on). However, at the end
of C methods, C blocks (IMEMO_IFUNC) etc there are no checking
and it can introduce uninterruptible thread.
To modify this situation, we decide to place CHECK_INTS() at
vm_pop_frame(). It increases interrupt checking points.
[Bug #16366]
This patch can introduce unexpected events...
|
|
This reverts commit 5e275dd2af4d9d24cdb1cfc0f232f348dae9c2cd.
...The @1 type numberd parameter is reverted from Ruby syntax.
|
|
for https://github.com/ruby/ruby/security/policy
|
|
By this change, the following code prints only one warning.
```
def foo(**opt); end
100.times { foo({kw:1}) }
```
A global variable `st_table *caller_to_callees` is a map from caller to
a set of callee methods. It remembers that a warning is already printed
for each pair of caller and callee.
[Feature #16289]
Notes:
Merged: https://github.com/ruby/ruby/pull/2458
|
|
This is a top-level version of Module#ruby2_keywords.
It can be used for functions (top-level methods) that delegates
arguments. [Feature #16364]
|
|
|
|
`JSONGeneratorTest#test_remove_const_seg` is meaningful only for
the extension library version, but nonsense for pure ruby version.
|
|
[ci skip]
|
|
|
|
|
|
|
|
This reverts commit 2e6f1cf8b264f4c8499c4e5f18bf662fdade04ff.
|
|
This reverts commit 27d0d7c0d39076d4bbacd3c3f3864322699db7b4.
|
|
|
|
|
|
|
|
|
|
vm_getivar() provides fastpath for T_OBJECT by caching an index
of ivar. This patch also provides fastpath for FL_EXIVAR objects.
FL_EXIVAR objects have an each ivar array and index can be cached
as T_OBJECT. To access this ivar array, generic_iv_tbl is exposed
by rb_ivar_generic_ivtbl() (declared in variable.h which is newly
introduced).
Benchmark script:
Benchmark.driver(repeat_count: 3){|x|
x.executable name: 'clean', command: %w'../clean/miniruby'
x.executable name: 'trunk', command: %w'./miniruby'
objs = [Object.new, 'str', {a: 1, b: 2}, [1, 2]]
objs.each.with_index{|obj, i|
rep = obj.inspect
rep = 'Object.new' if /\#/ =~ rep
x.prelude str = %Q{
v#{i} = #{rep}
def v#{i}.foo
@iv # ivar access method (attr_reader)
end
v#{i}.instance_variable_set(:@iv, :iv)
}
puts str
x.report %Q{
v#{i}.foo
}
}
}
Result:
v0.foo # T_OBJECT
clean: 85387141.8 i/s
trunk: 85249373.6 i/s - 1.00x slower
v1.foo # T_STRING
trunk: 57894407.5 i/s
clean: 39957178.6 i/s - 1.45x slower
v2.foo # T_HASH
trunk: 56629413.2 i/s
clean: 39227088.9 i/s - 1.44x slower
v3.foo # T_ARRAY
trunk: 55797530.2 i/s
clean: 38263572.9 i/s - 1.46x slower
|
|
|
|
|
|
|
|
|
|
|
|
After the previous commit, this was still broken. The reason it
was broken is that a refined module that hasn't been prepended to
yet keeps the refined methods in the module's method table. When
prepending, the module's method table is moved to the origin
iclass, and then the refined methods are moved from the method
table to a new method table in the module itself.
Unfortunately, that means that if a class has included the module,
prepending breaks the refinements, because when the methods are
moved from the origin iclass method table to the module method
table, they are removed from the method table from the iclass
created when the module was included earlier.
Fix this by always creating an origin class when including a
module that has any refinements, even if the refinements are
not currently used. I wasn't sure the best way to do that.
The approach I choose was to use an object flag. The flag is
set on the module when Module#refine is called, and if the
flag is present when the module is included in another module
or class, an origin iclass is created for the module.
Fixes [Bug #13446]
Notes:
Merged: https://github.com/ruby/ruby/pull/2550
|
|
This previously did not work, and the reason it did not work is
that:
1) Refining a module or class that prepends other modules places
the refinements in the class itself and not the origin iclass.
2) Inclusion of a module that prepends other modules skips the
module itself, including only iclasses for the prepended modules
and the origin iclass.
Those two behaviors combined meant that the method table for the
refined methods for the included module never ends up in the
method lookup chain for the class including the module.
Fix this by not skipping the module itself when the module is
included. This requires some code rearranging in
rb_include_class_new to make sure the correct method tables and
origin settings are used for the created iclass.
As origin iclasses shouldn't be exposed to Ruby, this also
requires skipping modules that have origin iclasses in
Module#ancestors (classes that have origin iclasses were already
skipped).
Fixes [Bug #16242]
Notes:
Merged: https://github.com/ruby/ruby/pull/2550
|
|
|
|
IRB completion logic always needed exponential notation for complex literal
such as 3e6i but it's bug. I fixed to support complex literal without
exponential notation such as 3i.
|
|
* `expr in pattern` should raise `NoMatchingError` when unmatched
* `expr in pattern` should return `nil`. (this is unspecified, but
this feature is experimental, at all)
[Feature #16355]
|
|
Since https://github.com/ruby/ruby/pull/2576,
`new_cond` uses the Monitor object, not the receiver.
|
|
|
|
|
|
|
|
|
|
|
|
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners#windows-server-2016
> Note: The Windows Server 2016 virtual environment will be removed on December 3, 2019.
Notes:
Merged: https://github.com/ruby/ruby/pull/2704
|
|
|
|
Previously, the rest array was modified, but it turns out that is
not necessary. Not modifying the rest array fixes cases when the
rest array is used more than once.
Notes:
Merged: https://github.com/ruby/ruby/pull/2706
|