There is a `time` key in GC.stat that gives us the total time spent in
GC. However, we don't know what proportion of the time is spent between
marking and sweeping. This makes it difficult to tune the GC as we're
not sure where to focus our efforts on.
This PR adds keys `marking_time` and `sweeping_time` to GC.stat for the
time spent marking and sweeping, in milliseconds.
[Feature #19437]
[Bug #19439]
The instance variables were restore on the Regexp source,
not the regexp itself.
Unfortunately we have a bit of a chicken and egg problem.
The source holds the encoding, and the encoding need to be set on
the source to be able to instantiate the Regexp.
So the instance variables have to be read on the `source`.
To correct this we transfert the instance variables after
instantiating the Regexp.
The only way to avoid this would be to read the instance variable
twice and rewind.
JRuby has its own implementation of the `openssl` library in
jruby-openssl. The simplest way for us to allow users to set
openssl as a gem dependency is to ship a stub gem that just
depends on jruby-openssl. This patch adds that to the gemspec.
Additional work may be required to fit this stub gem into the test
and release process.
See #20 for more details.
https://github.com/ruby/openssl/commit/74ccaa5e18
(https://github.com/ruby/strscan/pull/58)
`string` returns the original string after `scan` is called. Current
test doesn't check this behavior and now it's covered.
* Replaces the wording of "is forbidden" with "cannot be used"
* Fixes the method signature of VersionRange::Empty#eql?
https://github.com/rubygems/rubygems/commit/8c6b3f130b
Co-authored-by: Daniel Colson <danieljamescolson@gmail.com>
The dependency of extconf.h on bigdecimal.gemspec does not make sense
as far as no rule is defined for it. Also, the relationship between
extension library and gemspec file is various in default gems, and
does not work well.
https://github.com/ruby/bigdecimal/commit/7f99b28552
* If the receiver is a Class, use "... for class <class name>".
* If the receiver is a Module, use "... for module <module name>".
* If the receiver is an extended object (i.e., has a singleton class),
use "... for <rb_any_to_s(receiver)>".
* Otherwise, use "... for an instance of <class name>".
Examples:
```
42.time #=> undefined method `time' for an instance of Integer (NoMethodError)
class Foo
privatee #=> undefined local variable or method 'privatee' for class Foo (NoMethodError)
end
def (o=Object.new).foo
end
o.bar #=> undefined method `bar' for #<Object: 0xdeadbeef(any_to_s)> (NoMethodError)
```
```
42.time #=> undefined method `time' for object Integer (NoMethodError)
class Foo
privatee #=> undefined local variable or method 'privatee' for class Foo (NoMethodError)
end
s = ""
def s.foo = nil
s.bar #=> undefined method `bar' for extended object String (NoMethodError)
```
[Feature #18285]
I run a 32-bit (x86) userspace on a 64-bit kernel to save memory
and this test fails for the same reason it does on pure 32-bit
platforms.
Followup-to: 6cf7c0a48f (test/readline/test_readline.rb: skip a test on i686-linux, 2021-11-09)