You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* compile.c: Pass node instead of nd_line(node) to ADD_INSN* functions
... then, new_insn_core extracts nd_line(node).
Also, if a macro "EXPERIMENTAL_ISEQ_NODE_ID" is defined, this changeset
keeps nd_node_id(node) for each instruction. This is intended for
TypeProf to identify what AST::Node corresponds to each instruction.
This patch is originally authored by @yui-knk for showing which column a
NoMethodError occurred.
ruby/ruby@master...yui-knk:feature/node_id
Co-Authored-By: Yuichiro Kaneko <[email protected]>
* Fixed shorten-64-to-32 errors when USE_COMBINATION_EXPLOSION_CHECK
* What's Here for class File (ruby#4460)
What's Here for class File
* * 2021-05-08 [ci skip]
* What's Here for class Dir (ruby#4472)
What's Here for class Dir
* Shrink timev.rb iseq size
* [ruby/irb] Dump ancestors' methods by ls command
ruby/irb@73edff287c
* [ruby/irb] Deal with different screen sizes
ruby/irb@7118b3322f
* Fix example code in Array#max doc
`[0, 1, 2, 3].max(6)` actually returns `[3, 2, 1, 0]`, but the doc said
it returns `[3, 2, 1]`.
* Enhanced RDoc for Enumerable (ruby#4473)
Enhanced RDoc for Enumerable: #grep and #grep_v.
* * 2021-05-09 [ci skip]
* Fix Math.cbrt(0.0) on glibc
This should return 0, but on glibc it returned NaN.
Fixes [Bug #17804]
* rb_fiber_new_kw: doesn't exist
Not against having such thing but currently we lack one.
* * 2021-05-10 [ci skip]
* LEGAL: Remove entries that no longer exist
lib/bundler.gemspec and man/bundle-*,gemfile.* are now under the
directory lib/bundler/.
* Removed missing/dup2.c
This function should be always available, as POSIX-compliant or
Windows platform are required since 1.9. Also the code in this
file is MT-unsafe.
* [ruby/set] Adding section: What's Here
ruby/set@ab81354de1
* [ruby/set] Adding section: What's Here
ruby/set@254d927c8c
* [ruby/set] Adding section: What's Here
ruby/set@8f4c62768d
* [ruby/set] Adding section: What's Here
ruby/set@257dc452a7
* Add a space to separate sentences in the error message
* [ruby/set] set is also dual licenses
ruby/set@fc24457e53
* [ruby/psych] Use test-unit instead of minitest
ruby/psych@01e7310dd3
* [ruby/psych] Use Ractor constant for ignoreing condition
ruby/psych@cc5f957327
* [ruby/psych] Fixed test-case for NaN
ruby/psych@f85a008263
* [ruby/psych] Use pend instead of skip
ruby/psych@efd2a62c9a
* [ruby/psych] Use assert_raise instead of assert_raises
ruby/psych@e6ad12b4e1
* [ruby/psych] Cache access to Psych.load_tags in Visitor::ToRuby
ruby/psych@58223f0426
* [ruby/psych] Cache dispatch cache in an instance variable
ruby/psych@285c461cd2
* [ruby/psych] Fix custom marshalization with symbolize_names: true
ruby/psych@ee26f26ab5
* [ruby/psych] Update to latest SnakeYAML
Fixesjruby/jruby#6365ruby/psych@a88ff77f02
* [ruby/psych] docs: fix simple typo, expessed -> expressed
There is a small typo in ext/psych/yaml/yaml.h.
Should read `expressed` rather than `expessed`.
ruby/psych@1150d669cb
* [ruby/psych] bump version
ruby/psych@091cd46b1f
* [ruby/psych] Fix some typos [ci skip]
ruby/psych@98617e55a1
* Enhanced RDoc for Enumerable (ruby#4479)
Methods treated:
#count
#find
#find_index
#select
#filter_map
#reject
#map
#flat_map
* * 2021-05-11 [ci skip]
* .github/compilers/workflows.yml: support GCC-11
GCC 11.1 was released. https://gcc.gnu.org/pipermail/gcc/2021-April/235922.html
See also ruby/ruby-ci-image#1
* [ruby/irb] Treat encodings in exception correctly
ruby/irb@4452adbe04
* Simplify syncing bundler
These files no longer exist upstream, so they don't need to be synced.
* Properly synchronize bundler gemspec too
By making the necessary modifications automatically.
* Sync bundler & rubygems at the same time
* Sync bundler & rubygems
* [ruby/resolv] Fix confusion of received response message
This is a follow up for commit 33fb966197f1 ("Remove sender/message_id
pair after response received in resolv", 2020-09-11).
As the @senders instance variable is also used for tracking transaction
ID allocation, simply removing an entry without releasing the ID would
eventually deplete the ID space and cause
Resolv::DNS.allocate_request_id to hang.
It seems the intention of the code was to check that the received DNS
message is actually the response for the question made within the method
earlier. Let's have it actually do so.
[Bug ruby#12838] https://bugs.ruby-lang.org/issues/12838
[Bug #17748] https://bugs.ruby-lang.org/issues/17748ruby/resolv@53ca9c9209
* [ruby/irb] Skip the new IRB test on Windows for now
It's not passing from the beginning
https://github.com/ruby/ruby/runs/2550929220https://ci.appveyor.com/project/ruby/ruby/builds/39100747ruby/irb@71fc180018
* Retry choco install
by using a wrapper provided by GitHub Actions
actions/runner-images#721
to address failures like
https://github.com/ruby/ruby/runs/2551980671
* Try running Choco-Install with powershell
https://github.com/ruby/ruby/runs/2552047430
* test/irb/test_raise_no_backtrace_exception.rb: UTF-8 is expected
... for the output of assert_in_out_err.
This will fix the following failure on many CI machines
http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20210511T030005Z.fail.html.gz
```
1) Failure:
TestIRB::TestRaiseNoBacktraceException#test_raise_exception_with_different_encoding_containing_invalid_byte_sequence [/home/chkbuild/chkbuild/tmp/build/20210511T030005Z/ruby/test/irb/test_raise_no_backtrace_exception.rb:41]:
pid 221531 exit 0.
1. [1/2] Assertion for "stdout"
| invalid byte sequence in US-ASCII.
```
* Split a Choco-Install command
In https://github.com/ruby/ruby/runs/2552065052, while it failed to
install winflexbison3, it exited the retry loop because openssl was
installed successfully.
https://github.com/actions/virtual-environments/blob/a5ee51f72dcbc3879a91a74c63f95737e2d4a292/images/win/scripts/ImageHelpers/ChocoHelpers.ps1
* Explicitly specify encoding for another test as well
Same as e2ccc33https://ci.appveyor.com/project/ruby/ruby/builds/39102539/job/k8m1yrrjesxbgvtq
* [ruby/irb] Skip test_raise_exception_with_invalid_byte_sequence
on Windows for now. It seems like we haven't figured this out yet.
ruby/irb@ecf5a1ace1
* [ruby/irb] Fix `Encoding::ConverterNotFoundError`
Follow ruby/irb#237.
This PR fixes the following `Encoding::ConverterNotFoundError`.
```console
% bin/spring stop && bin/rails c
Spring stopped.
Running via Spring preloader in process 58395
Loading development environment (Rails 6.0.3.7)
irb(main):001:0> "こんにちは".do_something
Traceback (most recent call last):
(snip)
12: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:547:in `eval_input'
11: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:232:in `each_top_level_statement'
10: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:232:in `catch'
9: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:233:in `block in each_top_level_statement'
8: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:233:in `loop'
7: from /Users/koic/src/github.com/ruby/irb/lib/irb/ruby-lex.rb:251:in `block (2 levels) in each_top_level_statement'
6: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:548:in `block in eval_input'
5: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:758:in `signal_status'
4: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:586:in `block (2 levels) in eval_input'
3: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:650:in `handle_exception'
2: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:601:in `encode_with_invalid_byte_sequence'
1: from /Users/koic/src/github.com/ruby/irb/lib/irb.rb:601:in `new'
/Users/koic/src/github.com/ruby/irb/lib/irb.rb:601:in `initialize': code
converter not found (UTF-8 to UTF-8) (Encoding::ConverterNotFoundError)
```
First, this patch skips `Encoding::Converter.new` for the same encoding.
https://github.com/ruby/irb/blob/170531df19bce289444afe97360480efed5f27f0/lib/irb.rb#L601
Next, this is a talk about the condition for skipping. `IRB.conf[:LC_MESSAGES].encoding`
becomes `"UTF-8"` string when `Reline.encoding_system_needs.name` is set in the below.
https://github.com/ruby/irb/blob/170531df19bce289444afe97360480efed5f27f0/lib/irb/input-method.rb#L269
OTOH, `message.encoding` is `Encoding::UTF_8`, so these are compared as a string by this patch.
ruby/irb@6df6e76cfc
* Alias assert/refute_path_exists for test-unit gem.
It's required at rubygems/rubygems#3141
* test/irb/test_raise_no_backtrace_exception.rb: Set LC_MESSAGES as UTF-8
* Fix a typo of c6a11b8
It failed to define `refute_path_not_exist`
* Workaround for make test-tool
* Method cache: fix refinement entry handling
To invalidate some callable method entries, we replace the entry in the
class. Most types of method entries are on the method table of the
origin class, but refinement entries without an orig_me are housed in
the method table of the class itself. They are there because refinements
take priority over prepended methods.
By unconditionally inserting a copy of the refinement entry into the
origin class, clearing the method cache created situations where there
are refinement entry duplicates in the lookup chain, leading to infinite
loops and other problems.
Update the replacement logic to use the right class that houses the
method entry. Also, be more selective about cache invalidation when
moving refinement entries for prepend. This avoids calling
clear_method_cache_by_id_in_class() before refinement entries are in the
place it expects.
[Bug #17806]
* * 2021-05-12 [ci skip]
* Add a cache for class variables
This change implements a cache for class variables. Previously there was
no cache for cvars. Cvar access is slow due to needing to travel all the
way up th ancestor tree before returning the cvar value. The deeper the
ancestor tree the slower cvar access will be.
The benefits of the cache are more visible with a higher number of
included modules due to the way Ruby looks up class variables. The
benchmark here includes 26 modules and shows with the cache, this branch
is 6.5x faster when accessing class variables.
```
compare-ruby: ruby 3.1.0dev (2021-03-15T06:22:34Z master 9e5105c) [x86_64-darwin19]
built-ruby: ruby 3.1.0dev (2021-03-15T12:12:44Z add-cache-for-clas.. c6be009) [x86_64-darwin19]
| |compare-ruby|built-ruby|
|:--------|-----------:|---------:|
|vm_cvar | 5.681M| 36.980M|
| | -| 6.51x|
```
Benchmark.ips calling `ActiveRecord::Base.logger` from within a Rails
application. ActiveRecord::Base.logger has 71 ancestors. The more
ancestors a tree has, the more clear the speed increase. IE if Base had
only one ancestor we'd see no improvement. This benchmark is run on a
vanilla Rails application.
Benchmark code:
```ruby
require "benchmark/ips"
require_relative "config/environment"
Benchmark.ips do |x|
x.report "logger" do
ActiveRecord::Base.logger
end
end
```
Ruby 3.0 master / Rails 6.1:
```
Warming up --------------------------------------
logger 155.251k i/100ms
Calculating -------------------------------------
```
Ruby 3.0 with cvar cache / Rails 6.1:
```
Warming up --------------------------------------
logger 1.546M i/100ms
Calculating -------------------------------------
logger 14.857M (± 4.8%) i/s - 74.198M in 5.006202s
```
Lastly we ran a benchmark to demonstate the difference between master
and our cache when the number of modules increases. This benchmark
measures 1 ancestor, 30 ancestors, and 100 ancestors.
Ruby 3.0 master:
```
Warming up --------------------------------------
1 module 1.231M i/100ms
30 modules 432.020k i/100ms
100 modules 145.399k i/100ms
Calculating -------------------------------------
1 module 12.210M (± 2.1%) i/s - 61.553M in 5.043400s
30 modules 4.354M (± 2.7%) i/s - 22.033M in 5.063839s
100 modules 1.434M (± 2.9%) i/s - 7.270M in 5.072531s
Comparison:
1 module: 12209958.3 i/s
30 modules: 4354217.8 i/s - 2.80x (± 0.00) slower
100 modules: 1434447.3 i/s - 8.51x (± 0.00) slower
```
Ruby 3.0 with cvar cache:
```
Warming up --------------------------------------
1 module 1.641M i/100ms
30 modules 1.655M i/100ms
100 modules 1.620M i/100ms
Calculating -------------------------------------
1 module 16.279M (± 3.8%) i/s - 82.038M in 5.046923s
30 modules 15.891M (± 3.9%) i/s - 79.459M in 5.007958s
100 modules 16.087M (± 3.6%) i/s - 81.005M in 5.041931s
Comparison:
1 module: 16279458.0 i/s
100 modules: 16087484.6 i/s - same-ish: difference falls within error
30 modules: 15891406.2 i/s - same-ish: difference falls within error
```
Co-authored-by: Aaron Patterson <[email protected]>
* Filling cache values on cvar write
Instead of on read. Once it's in the inline cache we never have to make
one again. We want to eventually put the value into the cache, and the
best opportunity to do that is when you write the value.
* Revert "Filling cache values on cvar write"
This reverts commit 08de37f.
This reverts commit e8ae922.
* Run nmake check on Actions (ruby#4487)
* Run nmake check on Actions
* Skip tests not working in mswin GitHub Actions
* Override TEMP
* Revert "Skip tests not working in mswin GitHub Actions"
This reverts commit 544d257.
* Revert "Revert "Skip tests not working in mswin GitHub Actions""
This reverts commit e1f8ad7.
* Fix timeouts
* Skip some more broken tests
* Update windows.yml
* Add a guard for rbasic_spec
* Revert "Update windows.yml"
This reverts commit bc9694b.
* Skip the ensure clause
* Simplify the ensure
* Update keyword argument description in method syntax guide
Remove discussion of Ruby 2.7 specific handling of keyword
argument separation. Add a small example of keyword to
positional hash conversion for methods not accepting
keyword arguments.
* [ruby/net-ftp] Bump version to 0.1.2
ruby/net-ftp@895ba44b3c
* cdhash_cmp: can take rational literals
Rational literals are those integers suffixed with `r`. They tend to
be a part of more complex expressions like `123/456r`, but in theory
they can live alone. When such "bare" rational literals are passed to
case-when branch, we have to take care of them. Fixes [Bug #17854]
* cdhash_cmp: rational literals with fractions
Nobu kindly pointed out that rational literals can have fractions.
* cdhash_cmp: can also take complex
There are complex literals `123i`, which can also be a case condition.
* cdhash_cmp: recursively apply
For instance a rational's numerator can be a bignum. Comparison using
C's == can be insufficient.
* cdhash_cmp: should use ||
cf: ruby#4469 (comment)
* test_cdhash: refactor change class
It is now strange to test Complex in a class named Rational_Test.
* suppress warnings on repeat tests.
Constant definitions are affect on outer namespace of an anonymous
module. To define constants on the anonymous module, this patch
uses Module#class_eval(str).
* skip test for debug.
test_memsize_of_iseq fails on repeat tests and it seems to difficult
to solve immediately. Now this test is skipped.
It seems that the result of `memsize_of(Object.new)` are increased.
Why...?
* [rubygems/rubygems] Use test-unit instead of minitest
rubygems/rubygems@a8571524ad
* [rubygems/rubygems] Use capture_output instead of capture_io.
rubygems/rubygems@ad9206d4d0
* [rubygems/rubygems] Also use capture_output instead of capture_io
rubygems/rubygems@229858ea56
* [rubygems/rubygems] Use Regexp with refute_match
rubygems/rubygems@51fdbe53bc
* [rubygems/rubygems] Extract assert_output to assert_empty and assert_equal with capture_output
rubygems/rubygems@f6759440a4
* [rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead of assert_path_exists and refute_path_exists
rubygems/rubygems@a7c93558c3
* [rubygems/rubygems] Use capture_output instead of capture_io for test-unit
rubygems/rubygems@ab9c80d4cb
* [rubygems/rubygems] Use capture_output instead of assert_silent
rubygems/rubygems@3225aab7f8
* [rubygems/rubygems] Use dummy assertion for assert_https
rubygems/rubygems@64d843fe17
* [rubygems/rubygems] Use assert_raise instead of assert_raises
rubygems/rubygems@769e87f011
* [rubygems/rubygems] Use capture_output instead of capture_io
rubygems/rubygems@c46185abe3
* [rubygems/rubygems] Rewrite with capture_output
rubygems/rubygems@a091004ded
* [rubygems/rubygems] Import capture_subprocess_io from minitest
rubygems/rubygems@8b2ca6df3a
* [rubygems/rubygems] Fixed variable scope at test_silent_system
rubygems/rubygems@bfcdf79657
* [rubygems/rubygems] capture_output will return empty string, not nil
rubygems/rubygems@3fa93f6144
* [rubygems/rubygems] Removed minitest/mock from test_gem_package_tar_writer.rb
rubygems/rubygems@45464bfcbd
* [rubygems/rubygems] Removed minitest/mock from test/rubygems/test_gem_remote_fetcher.rb
rubygems/rubygems@f1af59fe02
* [rubygems/rubygems] Don't use Minitest::Mock
rubygems/rubygems@d3fa893597
* [rubygems/rubygems] util/rubocop -a
rubygems/rubygems@a10ff97830
* [rubygems/rubygems] Replace skip to pend
rubygems/rubygems@0b145135c7
* [rubygems/rubygems] Added comment for Minitest::Mock
rubygems/rubygems@ae44b68d57
* [rubygems/rubygems] Fixed an intentional blank-line
rubygems/rubygems@795b572ac2
* [rubygems/rubygems] Removed the related code for minitest-bisect
rubygems/rubygems@83ebdec27a
* [rubygems/rubygems] Update the link of minitest code with the commit hash.
rubygems/rubygems@e7280f8d30
* [rubygems/rubygems] Added begin-end block for java platform
Because pend of test-unit raises exception.
rubygems/rubygems@b5e2d0855a
* Revert 924ce2c5ba4d1c1dc781a6a06682204d358421bb
Because test-unit didn't provide the benchmark test. And This test
is fragile with the several environments.
* Use assert_raise instead of assert_raises
* Use another class for the comparison.
`memsize_of(Object.new)` can be changed with past ivar creation
history for Object instances (another Object instance has 4 or
more ivars, next created Object instance has the area for the
ivars). So use antoher class for the comparison.
* * remove trailing spaces. [ci skip]
* parse.y: Allow "command" syntax in endless method definition
This change allows `def hello = puts "Hello"` without parentheses.
Note that `private def hello = puts "Hello"` does not parse for
technical reason.
[Feature #17398]
* * 2021-05-13 [ci skip]
* [rubygems/rubygems] Use `Time.stub :now` to avoid a random failure
Essentially this reverts 45464bfcbdf9f9cfb440950bc57a27d237627a17.
The commit removed a mock of Time.now, which caused a random failure.
http://rubyci.s3.amazonaws.com/ubuntu1804/ruby-master/log/20210512T123004Z.fail.html.gz
```
1) Failure:
TestGemPackageTarWriter#test_add_file_signer [/home/chkbuild/chkbuild/tmp/build/20210512T123004Z/ruby/test/rubygems/test_gem_package_tar_writer.rb:117]:
Field mtime of the tar header differs..
<"14046746312\u0000"> expected but was
<"14046746311\x00">.
```
Object#stub is defined at f1af59fe02ef2cc58f13e2742e4cc6cf8c2a1a20, so
now `Time.stub :now` works.
rubygems/rubygems@85f60a9ed0
* Fix handling of control/meta escapes in literal regexps
Ruby uses a recursive algorithm for handling control/meta escapes
in strings (read_escape). However, the equivalent code for regexps
(tokadd_escape) in did not use a recursive algorithm. Due to this,
Handling of control/meta escapes in regexp did not have the same
behavior as in strings, leading to behavior such as the following
returning nil:
```ruby
/\c\xFF/ =~ "\c\xFF"
```
Switch the code for handling \c, \C and \M in literal regexps to
use the same code as for strings (read_escape), to keep behavior
consistent between the two.
Fixes [Bug ruby#14367]
* Avoid improper optimization of case statements mixed integer/rational/complex
Fixes [Bug #17857]
* Also `\U` after control/meta is invalid [Bug #17861]
As well as `\u`, `\U` should be invalid there too.
And highlight including `u`/`U` not only the backslash before it.
* Try to fix MJIT symbol clash with cargo cult
Co-authored-by: Yusuke Endoh <[email protected]>
Co-authored-by: Yuichiro Kaneko <[email protected]>
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Co-authored-by: Burdette Lamar <[email protected]>
Co-authored-by: git <[email protected]>
Co-authored-by: Masataka Pocke Kuwabara <[email protected]>
Co-authored-by: Jeremy Evans <[email protected]>
Co-authored-by: 卜部昌平 <[email protected]>
Co-authored-by: Andrei Beliankou <[email protected]>
Co-authored-by: Hiroshi SHIBATA <[email protected]>
Co-authored-by: Jean Boussier <[email protected]>
Co-authored-by: Charles Oliver Nutter <[email protected]>
Co-authored-by: Tim Gates <[email protected]>
Co-authored-by: Aaron Patterson <[email protected]>
Co-authored-by: Ryuta Kamizono <[email protected]>
Co-authored-by: aycabta <[email protected]>
Co-authored-by: David Rodríguez <[email protected]>
Co-authored-by: Kazuki Yamaguchi <[email protected]>
Co-authored-by: Takashi Kokubun <[email protected]>
Co-authored-by: Koichi ITO <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Co-authored-by: eileencodes <[email protected]>
Co-authored-by: Shugo Maeda <[email protected]>
Co-authored-by: Koichi Sasada <[email protected]>
0 commit comments