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:
parent
c143a2f947
commit
92da224d22
1 changed files with 15 additions and 0 deletions
|
@ -21,5 +21,20 @@ Gem::Specification.new do |s|
|
||||||
lib/io/console/size.rb
|
lib/io/console/size.rb
|
||||||
]
|
]
|
||||||
s.extensions = %w[ext/io/console/extconf.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"]
|
s.licenses = ["Ruby", "BSD-2-Clause"]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue