mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
remove the deprecated open() method on context.
This commit is contained in:
parent
ab33a88411
commit
216ea6264e
3 changed files with 7 additions and 17 deletions
|
@ -8,12 +8,6 @@ module V8
|
|||
@scope = V8::Object.new(@native.Global(), @native)
|
||||
yield(self) if block_given?
|
||||
end
|
||||
|
||||
def open
|
||||
@native.enter do
|
||||
yield(self)
|
||||
end if block_given?
|
||||
end
|
||||
|
||||
def eval(javascript, filename = "<eval>", line = 1)
|
||||
if IO === javascript || StringIO === javascript
|
||||
|
@ -57,11 +51,7 @@ module V8
|
|||
def []=(key, value)
|
||||
@scope[key] = value
|
||||
end
|
||||
|
||||
def self.open(opts = {}, &block)
|
||||
new(opts).open(&block)
|
||||
end
|
||||
|
||||
|
||||
def self.eval(source)
|
||||
new.eval(source)
|
||||
end
|
||||
|
|
|
@ -30,8 +30,10 @@ module V8
|
|||
end
|
||||
|
||||
def each
|
||||
for prop in To.rb(@native.GetPropertyNames())
|
||||
yield prop, self[prop]
|
||||
@context.enter do
|
||||
for prop in To.rb(@native.GetPropertyNames())
|
||||
yield prop, self[prop]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -39,8 +41,6 @@ end
|
|||
|
||||
class Object
|
||||
def eval_js(javascript)
|
||||
V8::Context.open(:with => self) do |cxt|
|
||||
cxt.eval(javascript)
|
||||
end
|
||||
V8::Context.new(:with => self).eval(javascript)
|
||||
end
|
||||
end
|
|
@ -1 +1 @@
|
|||
Subproject commit 8ecf5e635559a8e5043b426c764dd3a8492d209f
|
||||
Subproject commit f1d47fe8303d6ae6a85d6e523368f79a20c4354e
|
Loading…
Reference in a new issue