summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-05Enhanced RDoc for IO (#5395)Burdette Lamar
Treats: #getc #readchar #getbyte #readbyte #ungetbyte Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-01-06* 2022-01-06 [ci skip]git
2022-01-05Remove Refinement#{extend_object,append_features,prepend_features}Jeremy Evans
Also make include, prepend, and extend raise a TypeError if one of the modules is a refinement. Implements [Feature #18270] Notes: Merged: https://github.com/ruby/ruby/pull/5358
2022-01-05test/ruby/test_refinement.rb: Remove "assigned but unused variable"Yusuke Endoh
2022-01-05Remove assertion causing read barrier to triggerPeter Zhu
GET_HEAP_PAGE reads the page. If during compaction there is a read barrier on the page, it causes the read barrier to trigger. Notes: Merged: https://github.com/ruby/ruby/pull/5394
2022-01-05[rubygems/rubygems] Exclude bin directory for newgem template, Because it ↵Hiroshi SHIBATA
contains only development script https://github.com/rubygems/rubygems/commit/01017ee8ca
2022-01-05NEWS: Links to the tickets to remove deprecated featuresNobuyoshi Nakada
2022-01-05NEWS: Removal of `Kernel#=~` [Feature #15231]Nobuyoshi Nakada
2022-01-05Add Module#refinements and Refinement#refined_class [Feature #12737]Shugo Maeda
2022-01-05Add Module.used_refinementsShugo Maeda
2022-01-05`res.response_body_permitted?` is not definedKazuhiro NISHIYAMA
`response_body_permitted?` is a method of request.
2022-01-04Enhanced RDoc for Enumerable (#5393)Burdette Lamar
A little more about the classes that include or extend Enumerable. Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-01-05Fix `Leaked file descriptor: TestIO_Console#test_console_kw`Kazuhiro NISHIYAMA
``` Leaked file descriptor: TestIO_Console#test_console_kw: 10 : #<File:/dev/tty> ```
2022-01-05Fix failures on ruby 3.1Kazuhiro NISHIYAMA
Because https://github.com/ruby/ruby/pull/5148 merged after Ruby 3.1.0 released. https://github.com/ruby/actions/runs/4705986643?check_suite_focus=true#step:18:144 ``` 1) Method#parameters adds * rest arg for "star" argument FAILED Expected [[:rest]] == [[:rest, :*]] to be truthy but was false /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:228:in `block (3 levels) in <top (required)>' /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/method/parameters_spec.rb:4:in `<top (required)>' 2) Proc#parameters adds * rest arg for "star" argument FAILED Expected [[:req, :x], [:rest]] == [[:req, :x], [:rest, :*]] to be truthy but was false /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:85:in `block (3 levels) in <top (required)>' /home/runner/work/actions/actions/snapshot-ruby_3_1/spec/ruby/core/proc/parameters_spec.rb:3:in `<top (required)>' ```
2022-01-05[rubygems/rubygems] Fix race conditon on JRubyDavid Rodríguez
On JRuby, sometimes we get the following error in CI when running a realworld test that checks that `gem install rails` succeeds: ``` ERROR: While executing gem ... (NoMethodError) undefined method `ignored=' for nil:NilClass /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/stub_specification.rb:193:in `to_spec' org/jruby/RubyArray.java:2642:in `map' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:758:in `_all' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:956:in `each' org/jruby/RubyEnumerable.java:1710:in `any?' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/resolver/activation_request.rb:111:in `installed?' /home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/request_set.rb:173:in `block in install' ``` I'm not sure how this error is happening, but I think there's no need to copy the `@ignored` instance variable when materializing stub specifications. This instance variable is used to not print a warning about missing extensions more than once for each gem upon gem activation, but as far as I can see, it's only used by methods that work on specification stubs. Once specifications are materialized, I think it can be safely ignored. https://github.com/rubygems/rubygems/commit/301cecd5a7
2022-01-04Fix documentation for Dir.globJeremy Evans
Dir.glob("*", File::FNM_DOTMATCH) no longer includes ".." in the returned array as of Ruby 3.1. Fixes [Bug #18436]
2022-01-04Fix crash on bootup when RGENGC_CHECK_MODE=2 with GC stressPeter Zhu
We need to unshare the array loaded_features because the shared root could be old gen (while loaded_features is young) which causes a WB miss. Notes: Merged: https://github.com/ruby/ruby/pull/5392
2022-01-04Enhanced RDoc for IO (#5381)Burdette Lamar
Treats: #lineno #lineno= #readline #readlines #each_line #each_byte #each_char #each_codepoint Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-01-04Don't segfault if Warning.warn is undefinedJeremy Evans
Check that there is a method entry for the method before passing it to rb_method_entry_arity. Fixes [Bug #18458] Notes: Merged: https://github.com/ruby/ruby/pull/5391
2022-01-05* 2022-01-05 [ci skip]git
2022-01-04Switch `is_pointer_to_heap` to use library bsearchMatt Valentine-House
This commit switches from a custom implemented bsearch algorithm to use the one provided by the C standard library. Because `is_pointer_to_heap` will only return true if the pointer being searched for is a valid slot starting address within the heap page body, we've extracted the bsearch call site into a more general function so we can use it elsewhere. The new function `heap_page_for_ptr` returns the heap page for any heap page pointer, regardless of whether that is at the start of a slot or in the middle of one. We then use this function as the basis of `is_pointer_to_heap`. Notes: Merged: https://github.com/ruby/ruby/pull/5187
2022-01-04[Feature #18364] Add GC.stat_heap to get stats for memory heapsPeter Zhu
GC.stat_heap will return stats for memory heaps. This is used for the Variable Width Allocation feature. Notes: Merged: https://github.com/ruby/ruby/pull/5177
2022-01-04[ruby/error_highlight] Add a test to check if it is robust against a spoofed ↵Yusuke Endoh
filename Previously, RubyVM::AST.of opened a wrong file if the iseq's file path is spoofed. ``` module Dummy binding.irb end ``` ``` $ ruby test.rb From: test.rb @ line 2 : 1: module Dummy => 2: binding.irb 3: end irb(Dummy):001:0> foo /home/mame/work/ruby/local/lib/ruby/3.1.0/error_highlight/base.rb:412:in `spot_colon2': undefined method `last_lineno' for nil:NilClass (NoMethodError) if nd_parent.last_lineno == @node.last_lineno ^^^^^^^^^^^^ ``` Found by @kateinoigakukun This issue is already fixed in the interpreter side. This change just adds a test for the case. https://github.com/ruby/error_highlight/commit/f3626b9032
2022-01-04[ruby/error_highlight] Fix the spurious TypeError.Christian Boos
When we have no backtrace locations, we can't have the highlight, so just return the message. https://github.com/ruby/error_highlight/commit/9f5c639494
2022-01-04[ruby/error_highlight] Reproduce the error seen when calling .to_s in ↵Christian Boos
embedded Ruby The test fails with the following error: Error: test_simulate_funcallv_from_embedded_ruby(ErrorHighlightTest): TypeError: wrong argument type nil (expected method) https://github.com/ruby/error_highlight/commit/52943c9cd2
2022-01-04Fix the previous commitYusuke Endoh
2022-01-04test/ruby/test_method.rb: Fix a random failure during `make COVERAGE=1`Yusuke Endoh
This fixes the following failure. ``` 1) Error: TestMethod#test_method_list: NoMethodError: undefined method `<=>' for #<BasicObject:0x00007f7757e7eb60> mods = mods.sort_by {|m| m.name } ^^^^^^^^ ``` https://github.com/ruby/actions/runs/4699487470?check_suite_focus=true TestNoMethodError#test_to_s creates an anonymous module whose `#name` method returns a BasicObject. https://github.com/ruby/ruby/blob/f0669fb6cbdbad499974252ef2d955a608d0adc1/test/ruby/test_nomethod_error.rb#L95-L99 TestMethod#test_method_list uses `ObjectSpace.each_object(Module)` to gather all Modules and attempts to sort them by `#name`. But the anonymous module returns a BasicObject, which leads to the test failure above.
2022-01-04Use omit instead of skip: test/ruby/**/*.rbHiroshi SHIBATA
2022-01-04[ruby/optparse] Use `require_relative` for internal requires ↵David Rodríguez
(https://github.com/ruby/optparse/pull/28) https://github.com/ruby/optparse/commit/e4f2682128
2022-01-04[rubygems/rubygems] Test the actual checksums of the mock gemsNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/2b42630959
2022-01-04[rubygems/rubygems] Fix the test to use the mock gem pathNobuyoshi Nakada
"NUL.*" means the NUL device on Windows, as well as mere "NUL", and no data is read. https://github.com/rubygems/rubygems/commit/e2c7d22745
2022-01-04[rubygems/rubygems] Append a newline to the checksum fileNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/48ea2778e9
2022-01-04[rubygems/rubygems] Fix checksumNobuyoshi Nakada
Calculate the checksum of the content, not the given pathname at the build time itself. https://github.com/rubygems/rubygems/commit/b60ee97ee9
2022-01-04[ruby/net-http] Handle invalid use of IP addresses in SNIJeremy Evans
Server Name Indication does not allow IP addresses (RFC 6066, section 3: `Literal IPv4 and IPv6 addresses are not permitted in "HostName".`). Recent versions of LibreSSL enforce this restriction, which raises when setting the hostname to an IP address (s.hostname=), before attempting to setup the SSL connection. Since the certificate used in the test is already for localhost, we cannot connect to localhost. However, as all the test does is check for a specific exception, just modify the regexp used so it handles both cases. https://github.com/ruby/net-http/commit/6ab399db45
2022-01-04* 2022-01-04 [ci skip]git
2022-01-03YJIT: Fix confusing self reference when initializing variableAlan Wu
2022-01-03YJIT: Refine commentsAlan Wu
Correct method name, fix copypasta, and add an ASCII illustration. [ci skip]
2022-01-03Kernel#=~: delete卜部昌平
Has been deprecated since ebff9dc10e6e72239c23e50acc7d3cbfdc659e7a.
2022-01-03* 2022-01-03 [ci skip]git
2022-01-03[ruby/reline] Remove test TODO comments that have been confirmed by E2E testsaycabta
https://github.com/ruby/reline/commit/2ed77b693f
2022-01-02Update RBS to skip testing `Kernel#=~` (#5386)Soutaro Matsumoto
Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2022-01-02Remove UTF-8 from documentation.Samuel Williams
2022-01-02[DOC] Adjust IO::Buffer docs (#5374)Victor Shepelev
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-01-02[ruby/etc] Note for rb_deprecate_constant [ci skip]Nobuyoshi Nakada
https://github.com/ruby/etc/commit/f87fe7ad93
2022-01-02Update default gems list at 6f53425825eb71d71c7fdd424801a2 [ci skip]git
2022-01-02NEWS: Removed constantsNobuyoshi Nakada
2022-01-02[ruby/etc] Remove deprecate constants under StructNobuyoshi Nakada
https://github.com/ruby/etc/commit/143edbd215
2022-01-02[ruby/etc] bump up to 1.4.0Nobuyoshi Nakada
https://github.com/ruby/etc/commit/ca41f182f6
2022-01-02[ruby/etc] bump up to 1.3.1Nobuyoshi Nakada
https://github.com/ruby/etc/commit/82dd69a4cf
2022-01-02[ruby/etc] [DOC] Refine Etc::Passwd#passwd descriptionNobuyoshi Nakada
https://github.com/ruby/etc/commit/17b99fe42e