mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00

JRuby currently ships its own internal bigdecimal extension as
part of the core libraries. In order for users to be able to add
bigdecimal to their Gemfile or gem dependencies, we need to stub
out the C extension and just load the extension shipped with
JRuby.
In the future we will try to move our BigDecimal implementation
into the gem, but for now this is the simplest way to make it
installable on JRuby.
See #169
829956c643
5 lines
130 B
Ruby
5 lines
130 B
Ruby
if RUBY_ENGINE == 'jruby'
|
|
JRuby::Util.load_ext("org.jruby.ext.bigdecimal.BigDecimalLibrary")
|
|
else
|
|
require 'bigdecimal.so'
|
|
end
|