File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,14 @@ class InstructionSequence
13
13
# pass a serialized iseq to Ruby and have it return a
14
14
# RubyVM::InstructionSequence object.
15
15
ISEQ_LOAD =
16
- Fiddle ::Function . new (
17
- Fiddle ::Handle ::DEFAULT [ "rb_iseq_load" ] ,
18
- [ Fiddle ::TYPE_VOIDP ] * 3 ,
19
- Fiddle ::TYPE_VOIDP
20
- )
16
+ begin
17
+ Fiddle ::Function . new (
18
+ Fiddle ::Handle ::DEFAULT [ "rb_iseq_load" ] ,
19
+ [ Fiddle ::TYPE_VOIDP ] * 3 ,
20
+ Fiddle ::TYPE_VOIDP
21
+ )
22
+ rescue NameError
23
+ end
21
24
22
25
# This object is used to track the size of the stack at any given time. It
23
26
# is effectively a mini symbolic interpreter. It's necessary because when
@@ -141,6 +144,7 @@ def length
141
144
end
142
145
143
146
def eval
147
+ raise "Unsupported platform" if ISEQ_LOAD . nil?
144
148
compiled = to_a
145
149
146
150
# Temporary hack until we get these working.
You can’t perform that action at this time.
0 commit comments