diff --git a/doc/io_streams.rdoc b/doc/io_streams.rdoc index a70a84811e..680d5e99c4 100644 --- a/doc/io_streams.rdoc +++ b/doc/io_streams.rdoc @@ -406,7 +406,7 @@ which is the non-negative integer line number in the stream where the next read will occur. The line number is the number of lines read by certain line-oriented methods -({::foreach}[https://docs.ruby-lang.org/en/master/IO.html#method-c-foreach], +({::foreach}[rdoc-ref:IO.foreach], {#each_line}[rdoc-ref:io_streams.rdoc@Method+-23each_line], {#gets}[rdoc-ref:io_streams.rdoc@Method+-23gets], {#readline}[rdoc-ref:io_streams.rdoc@Method+-23readline], diff --git a/lib/rubygems/core_ext/kernel_warn.rb b/lib/rubygems/core_ext/kernel_warn.rb index 8f43e00456..14a69938ca 100644 --- a/lib/rubygems/core_ext/kernel_warn.rb +++ b/lib/rubygems/core_ext/kernel_warn.rb @@ -16,7 +16,7 @@ if RUBY_VERSION >= "2.5" && !Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES module_function define_method(:warn) {|*messages, **kw| unless uplevel = kw[:uplevel] - if Gem.java_platform? + if Gem.java_platform? && RUBY_VERSION < "3.1" return original_warn.bind(self).call(*messages) else return original_warn.bind(self).call(*messages, **kw)