Skip to content

Commit 8c898e7

Browse files
committedMay 3, 2015
Better fix for optimized specialization for Struct.
Resolves #3388 (in a better way)
1 parent 20d0317 commit 8c898e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

Diff for: ‎kernel/delta/struct.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ def length
9292
CODE
9393

9494
begin
95-
module_eval code
95+
mod = Module.new do
96+
module_eval code
97+
end
98+
include mod
9699
rescue SyntaxError
97100
# SyntaxError means that something is wrong with the
98101
# specialization code. Just eat the error and don't specialize.

0 commit comments

Comments
 (0)