summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas E. Enebo <tom.enebo@gmail.com>2022-10-20 13:17:47 -0500
committergit <svn-admin@ruby-lang.org>2022-10-22 08:01:24 +0000
commit420bdba1397b355aec773688487229c20a1e7759 (patch)
tree92a746a72883d14f62d9e3900bbce4c7feb9ea3d /lib
parent0d697e341a63c58554bba4934d91f389e6d92178 (diff)
[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
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/core_ext/kernel_warn.rb2
1 files changed, 1 insertions, 1 deletions
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)