[前][次][番号順一覧][スレッド一覧]

ruby-changes:74204

From: Thomas <ko1@a...>
Date: Sat, 22 Oct 2022 17:01:41 +0900 (JST)
Subject: [ruby-changes:74204] 420bdba139 (master): [rubygems/rubygems] Allow upcoming JRuby to pass keywords for Kernel#warn

https://git.ruby-lang.org/ruby.git/commit/?id=420bdba139

From 420bdba1397b355aec773688487229c20a1e7759 Mon Sep 17 00:00:00 2001
From: "Thomas E. Enebo" <tom.enebo@g...>
Date: Thu, 20 Oct 2022 13:17:47 -0500
Subject: [rubygems/rubygems] Allow upcoming JRuby to pass keywords for
 Kernel#warn

jruby-head (which will be JRuby 9.4.0.0) can now properly process
the keywords to Kernel#warn.  I cannot think of any capability based
test for this so I constrained it using a version guard.  Only JRuby
will ever hit the version guard.

https://github.com/rubygems/rubygems/commit/cd468c7e0f
---
 doc/io_streams.rdoc                  | 2 +-
 lib/rubygems/core_ext/kernel_warn.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 https://github.com/ruby/ruby/blob/trunk/doc/io_streams.rdoc#L406
 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 https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_warn.rb#L16
 
     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)
-- 
cgit v1.2.3


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]