1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/io-console] Delegate to JRuby version

Add `--platform` option tentatively.

https://github.com/ruby/io-console/commit/3bf1a7b753
This commit is contained in:
Nobuyoshi Nakada 2020-01-10 17:19:42 +09:00
parent c143a2f947
commit 92da224d22
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -21,5 +21,20 @@ Gem::Specification.new do |s|
lib/io/console/size.rb
]
s.extensions = %w[ext/io/console/extconf.rb]
if i = ARGV.index("--") and !(argv = ARGV[i+1..-1]).empty?
OptionParser.new(__FILE__) do |opt|
opt.on("--platform=PLATFORM") {|p| s.platform = p}
end.parse!(argv)
end
if Gem::Platform === s.platform and s.platform =~ 'java'
s.files.delete_if {|f| f.start_with?("ext/")}
s.extensions.clear
s.require_paths.unshift("jruby")
s.files.concat(%w[
jruby/io/console.rb
])
end
s.licenses = ["Ruby", "BSD-2-Clause"]
end