1
0
Fork 0
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:
Charles Lowell 2010-05-27 19:28:50 +03:00
parent ab33a88411
commit 216ea6264e
3 changed files with 7 additions and 17 deletions

View file

@ -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

View file

@ -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