File tree 2 files changed +4
-12
lines changed
2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ gem 'tilt', tilt_version if tilt_version
19
19
gem 'sprockets' , sprockets_version if sprockets_version
20
20
21
21
group :repl do
22
- gem 'therubyracer ' , platform : :mri , require : false
22
+ gem 'mini_racer ' , platform : :mri , require : false
23
23
gem 'therubyrhino' , platform : :jruby , require : false
24
24
end
25
25
Original file line number Diff line number Diff line change @@ -14,20 +14,12 @@ module Opal
14
14
return if @v8
15
15
16
16
begin
17
- require 'v8 '
17
+ require 'mini_racer '
18
18
rescue LoadError
19
- abort 'opal-repl depends on therubyracer gem, which is not currently installed'
19
+ abort 'opal-repl depends on mini_racer gem, which is not currently installed'
20
20
end
21
21
22
- # Patch V8::Object#respond_to? to avoid MRI warning
23
- V8 ::Object . class_eval do
24
- def respond_to? ( method , private = false )
25
- super or self [ method ] != nil
26
- end
27
- end
28
-
29
- @v8 = V8 ::Context . new
30
- @v8 [ 'console' ] = self
22
+ @v8 = MiniRacer ::Context . new
31
23
@v8 . eval Opal ::Builder . new . build ( 'opal' ) . to_s
32
24
33
25
if filename
You can’t perform that action at this time.
0 commit comments