mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
11 lines
No EOL
264 B
Ruby
11 lines
No EOL
264 B
Ruby
require 'bigdecimal'
|
|
class V8::Conversion
|
|
module BigDecimal
|
|
def to_v8
|
|
context = V8::Context.current
|
|
constructor = context.to_v8(self.class)
|
|
object = constructor.NewInstance([V8::C::External::New(self)])
|
|
return object
|
|
end
|
|
end
|
|
end |