summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-09-12 10:19:11 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-09-26 17:48:01 +0900
commit54839f01736a8827be64c7f1720d226d37fa17d3 (patch)
tree5896440f1e71ca0367c286259e75b977979e34b0 /lib/rubygems/core_ext
parent966915d807f4d9ce8b9efaf5fedcceada05528c0 (diff)
[rubygems/rubygems] Fix jruby build
https://github.com/rubygems/rubygems/commit/cc255b774a
Diffstat (limited to 'lib/rubygems/core_ext')
-rwxr-xr-xlib/rubygems/core_ext/kernel_warn.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/core_ext/kernel_warn.rb b/lib/rubygems/core_ext/kernel_warn.rb
index 6c5b387..a1dd8ad 100755
--- a/lib/rubygems/core_ext/kernel_warn.rb
+++ b/lib/rubygems/core_ext/kernel_warn.rb
@@ -14,7 +14,11 @@ if RUBY_VERSION >= "2.5"
module_function define_method(:warn) {|*messages, **kw|
unless uplevel = kw[:uplevel]
- return original_warn.call(*messages, **kw)
+ if Gem.java_platform?
+ return original_warn.call(*messages)
+ else
+ return original_warn.call(*messages, **kw)
+ end
end
# Ensure `uplevel` fits a `long`