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
|
@ -9,12 +9,6 @@ module V8
|
|||
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
|
||||
javascript = javascript.read()
|
||||
|
@ -58,10 +52,6 @@ module V8
|
|||
@scope[key] = value
|
||||
end
|
||||
|
||||
def self.open(opts = {}, &block)
|
||||
new(opts).open(&block)
|
||||
end
|
||||
|
||||
def self.eval(source)
|
||||
new.eval(source)
|
||||
end
|
||||
|
|
|
@ -30,17 +30,17 @@ module V8
|
|||
end
|
||||
|
||||
def each
|
||||
@context.enter do
|
||||
for prop in To.rb(@native.GetPropertyNames())
|
||||
yield prop, self[prop]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
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