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

[ruby/cgi] jruby support

https://github.com/ruby/cgi/commit/93326fb622
This commit is contained in:
Pavel Rosický 2021-09-24 00:33:36 +02:00 committed by Hiroshi SHIBATA
parent 5d014bcb61
commit 4bc7cef866
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 16 additions and 4 deletions

View file

@ -22,10 +22,21 @@ Gem::Specification.new do |spec|
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
`git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{\A(?:(?:test|spec|features)/|\.git)}) }
end
spec.extensions = ["ext/cgi/escape/extconf.rb"]
spec.executables = []
spec.files = [
"LICENSE.txt",
"README.md",
*Dir["lib{.rb,/**/*.rb}", "bin/*"] ]
spec.require_paths = ["lib"]
if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby'
spec.platform = 'java'
spec.require_paths << "ext/java/org/jruby/ext/cgi/escape/lib"
spec.files += Dir["ext/java/**/*.{rb}", "lib/cgi/escape.jar"]
else
spec.files += Dir["ext/cgi/**/*.{rb,c,h,sh}", "ext/cgi/escape/depend", "lib/cgi/escape.so"]
spec.extensions = ["ext/cgi/escape/extconf.rb"]
end
end

View file

@ -105,6 +105,7 @@ class CGIUtilTest < Test::Unit::TestCase
end
def test_cgi_escape_html_large
return if RUBY_ENGINE == 'jruby'
ulong_max, size_max = RbConfig::LIMITS.values_at("ULONG_MAX", "SIZE_MAX")
return unless ulong_max < size_max # Platforms not concerned