Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/sync_default_gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
git pull --rebase origin ${GITHUB_REF#refs/heads/}
git push origin ${GITHUB_REF#refs/heads/}
if: ${{ steps.sync.outputs.update }}
env:
EMAIL: svn-admin@ruby-lang.org
GIT_AUTHOR_NAME: git
GIT_COMMITTER_NAME: git

- uses: ./.github/actions/slack
with:
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ The following default gems are updated.
* prism 1.6.0
* psych 5.2.6
* resolv 0.6.3
* stringio 3.1.8.dev
* stringio 3.1.9.dev
* strscan 3.1.6.dev
* timeout 0.4.4
* uri 1.1.1
Expand Down
2 changes: 1 addition & 1 deletion ext/stringio/stringio.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
**********************************************************************/

static const char *const
STRINGIO_VERSION = "3.1.8.dev";
STRINGIO_VERSION = "3.1.9.dev";

#include <stdbool.h>

Expand Down
22 changes: 11 additions & 11 deletions lib/bundled_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ module Gem::BUNDLED_GEMS # :nodoc:
"resolv-replace" => "3.4.0",
"rinda" => "3.4.0",
"syslog" => "3.4.0",
"ostruct" => "3.5.0",
"pstore" => "3.5.0",
"rdoc" => "3.5.0",
"win32ole" => "3.5.0",
"fiddle" => "3.5.0",
"logger" => "3.5.0",
"benchmark" => "3.5.0",
"irb" => "3.5.0",
"reline" => "3.5.0",
# "readline" => "3.5.0", # This is wrapper for reline. We don't warn for this.
"tsort" => "3.6.0",
"ostruct" => "4.0.0",
"pstore" => "4.0.0",
"rdoc" => "4.0.0",
"win32ole" => "4.0.0",
"fiddle" => "4.0.0",
"logger" => "4.0.0",
"benchmark" => "4.0.0",
"irb" => "4.0.0",
"reline" => "4.0.0",
# "readline" => "4.0.0", # This is wrapper for reline. We don't warn for this.
"tsort" => "4.1.0",
}.freeze

EXACT = {
Expand Down
2 changes: 1 addition & 1 deletion lib/error_highlight/core_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module CoreExt
_, _, snippet, highlight = ErrorHighlight.formatter.message_for(spot).lines
out += "\n | #{ snippet } #{ highlight }"
else
out += "\n (cannot highlight method definition; try Ruby 3.5 or later)"
out += "\n (cannot highlight method definition; try Ruby 4.0 or later)"
end
end
ret << "\n" + out if out
Expand Down
2 changes: 1 addition & 1 deletion lib/net/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@ def debug(msg)
alias_method :D, :debug
end

# for backward compatibility until Ruby 3.5
# for backward compatibility until Ruby 4.0
# https://bugs.ruby-lang.org/issues/20900
# https://github.com/bblimke/webmock/pull/1081
HTTPSession = HTTP
Expand Down
2 changes: 1 addition & 1 deletion numeric.c
Original file line number Diff line number Diff line change
Expand Up @@ -5553,7 +5553,7 @@ rb_int_digits_bigbase(VALUE num, VALUE base)
}

bases = rb_ary_new();
for (VALUE b = base; int_lt(b, num) == Qtrue; b = rb_int_mul(b, b)) {
for (VALUE b = base; int_le(b, num) == Qtrue; b = rb_int_mul(b, b)) {
rb_ary_push(bases, b);
}
digits = rb_ary_new_from_args(1, num);
Expand Down
14 changes: 7 additions & 7 deletions spec/bundled_gems_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def script(code, options = {})
require "active_support/all"
RUBY

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
expect(err).to include(/lib\/active_support\/all\.rb:1/)
end

Expand Down Expand Up @@ -159,7 +159,7 @@ def script(code, options = {})

bundle "exec ruby script.rb"

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
expect(err).to include(/script\.rb:8/)
end

Expand All @@ -177,7 +177,7 @@ def script(code, options = {})

bundle "exec ./script.rb"

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
expect(err).to include(/script\.rb:9/)
end

Expand All @@ -186,7 +186,7 @@ def script(code, options = {})
create_file("Gemfile", "source 'https://rubygems.org'")
bundle "exec ruby -r./stub -ropenssl -e ''"

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
end

it "Show warning when warn is not the standard one in the current scope" do
Expand All @@ -209,7 +209,7 @@ def my
My.my
RUBY

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
expect(err).to include(/-e:19/)
end

Expand Down Expand Up @@ -251,7 +251,7 @@ def my
require Gem::BUNDLED_GEMS::ARCHDIR + 'openssl'
RUBY

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
# TODO: We should assert caller location like below:
# test_warn_bootsnap.rb:14: warning: ...
end
Expand Down Expand Up @@ -320,7 +320,7 @@ def my
create_file("Gemfile", "source 'https://rubygems.org'")
bundle "exec ruby script.rb"

expect(err).to include(/openssl used to be loaded from (.*) since Ruby 3.5.0/)
expect(err).to include(/openssl used to be loaded from (.*) since Ruby 4.0.0/)
expect(err).to include(/script\.rb:13/)
end

Expand Down
2 changes: 2 additions & 0 deletions spec/bundler/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
require "rspec/expectations"
require "rspec/mocks"
require "rspec/support/differ"
gem "rubygems-generate_index"
require "rubygems/indexer"

require_relative "support/builders"
require_relative "support/checksums"
Expand Down
10 changes: 2 additions & 8 deletions spec/bundler/support/builders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,8 @@ def update_repo(path, build_compact_index: true)
@_build_path = "#{path}/gems"
@_build_repo = File.basename(path)
yield
with_gem_path_as scoped_base_system_gem_path do
Dir[scoped_base_system_gem_path.join("gems/rubygems-generate_index*/lib")].first ||
raise("Could not find rubygems-generate_index lib directory in #{scoped_base_system_gem_path}")

command = "generate_index"
command += " --no-compact" if !build_compact_index && gem_command(command + " --help").include?("--[no-]compact")
gem_command command, dir: path
end
options = { build_compact: build_compact_index }
Gem::Indexer.new(path, options).generate_index
ensure
@_build_path = nil
@_build_repo = nil
Expand Down
18 changes: 9 additions & 9 deletions test/error_highlight/test_error_highlight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ def test_wrong_number_of_arguments_for_method
MethodDefLocationSupported ?
"| def wrong_number_of_arguments_test(x, y)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1494,7 +1494,7 @@ def test_missing_keyword
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1515,7 +1515,7 @@ def test_missing_keywords # multiple missing keywords
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1536,7 +1536,7 @@ def test_unknown_keyword
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1557,7 +1557,7 @@ def test_unknown_keywords
MethodDefLocationSupported ?
"| def keyword_test(kw1:, kw2:, kw3:)
^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand Down Expand Up @@ -1587,7 +1587,7 @@ def test_wrong_number_of_arguments_for_method2
MethodDefLocationSupported ?
"| def wrong_number_of_arguments_test2(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1609,7 +1609,7 @@ def test_wrong_number_of_arguments_for_lambda_literal
MethodDefLocationSupported ?
"| v = -> {}
^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1631,7 +1631,7 @@ def test_wrong_number_of_arguments_for_lambda_method
MethodDefLocationSupported ?
"| v = lambda { }
^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand All @@ -1657,7 +1657,7 @@ def test_wrong_number_of_arguments_for_define_method
MethodDefLocationSupported ?
"| define_method :define_method_test do |x, y|
^^" :
"(cannot highlight method definition; try Ruby 3.5 or later)"
"(cannot highlight method definition; try Ruby 4.0 or later)"
}
END

Expand Down
3 changes: 3 additions & 0 deletions test/ruby/test_bignum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,9 @@ def test_digits
assert_equal([7215, 2413, 6242], T1024P.digits(10_000).first(3))
assert_equal([11], 11.digits(T1024P))
assert_equal([T1024P - 1, 1], (T1024P + T1024P - 1).digits(T1024P))
bug21680 = '[ruby-core:123769] [Bug #21680]'
assert_equal([0] * 64 + [1], (2**512).digits(256), bug21680)
assert_equal([0] * 128 + [1], (123**128).digits(123), bug21680)
end

def test_digits_for_negative_numbers
Expand Down
1 change: 1 addition & 0 deletions tool/bundler/dev_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
gem "rspec-core", "~> 3.12"
gem "rspec-expectations", "~> 3.12"
gem "rspec-mocks", "~> 3.12"
gem "rubygems-generate_index", "~> 1.1"

group :doc do
gem "ronn-ng", "~> 0.10.1", platform: :ruby
Expand Down
6 changes: 6 additions & 0 deletions tool/bundler/dev_gems.rb.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
compact_index (0.15.0)
diff-lcs (1.6.1)
kramdown (2.5.1)
rexml (>= 3.3.9)
Expand Down Expand Up @@ -54,6 +55,8 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
rubygems-generate_index (1.1.3)
compact_index (~> 0.15.0)
test-unit (3.6.7)
power_assert
turbo_tests (2.2.5)
Expand Down Expand Up @@ -83,10 +86,12 @@ DEPENDENCIES
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rubygems-generate_index (~> 1.1)
test-unit (~> 3.0)
turbo_tests (~> 2.2.3)

CHECKSUMS
compact_index (0.15.0) sha256=5c6c404afca8928a7d9f4dde9524f6e1610db17e675330803055db282da84a8b
diff-lcs (1.6.1) sha256=12a5a83f3e37a8e2f4427268e305914d5f1879f22b4e73bb1a09f76a3dd86cd4
kramdown (2.5.1) sha256=87bbb6abd9d3cebe4fc1f33e367c392b4500e6f8fa19dd61c0972cf4afe7368c
kramdown-parser-gfm (1.1.0) sha256=fb39745516427d2988543bf01fc4cf0ab1149476382393e0e9c48592f6581729
Expand Down Expand Up @@ -115,6 +120,7 @@ CHECKSUMS
rspec-expectations (3.13.3) sha256=0e6b5af59b900147698ea0ff80456c4f2e69cac4394fbd392fbd1ca561f66c58
rspec-mocks (3.13.2) sha256=2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef
rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
rubygems-generate_index (1.1.3) sha256=3571424322666598e9586a906485e1543b617f87644913eaf137d986a3393f5c
test-unit (3.6.7) sha256=c342bb9f7334ea84a361b43c20b063f405c0bf3c7dbe3ff38f61a91661d29221
turbo_tests (2.2.5) sha256=3fa31497d12976d11ccc298add29107b92bda94a90d8a0a5783f06f05102509f

Expand Down