1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

run Context#scope through the standard conversion. It might be a primitive after all :)

This commit is contained in:
Charles Lowell 2010-06-06 13:58:36 +03:00
parent ec749aab49
commit 6714c0d737

View file

@ -5,7 +5,9 @@ module V8
attr_reader :native, :scope attr_reader :native, :scope
def initialize(opts = {}) def initialize(opts = {})
@native = C::Context::New(opts[:with]) @native = C::Context::New(opts[:with])
@scope = V8::Object.new(@native.Global(), @native) @native.enter do
@scope = To.rb(@native.Global())
end
yield(self) if block_given? yield(self) if block_given?
end end