ruby: Fix exception when handling catchless try*
authorDov Murik <dov.murik@gmail.com>
Tue, 19 Feb 2019 08:37:28 +0000 (08:37 +0000)
committerDov Murik <dov.murik@gmail.com>
Tue, 19 Feb 2019 08:37:28 +0000 (08:37 +0000)
ruby/step9_try.rb
ruby/stepA_mal.rb

index 71d16be..3a00491 100644 (file)
@@ -111,7 +111,7 @@ def EVAL(ast, env)
             if a2 && a2[0] == :"catch*"
                 return EVAL(a2[2], Env.new(env, [a2[1]], [exc]))
             else
-                raise esc
+                raise exc
             end
         end
     when :do
index 9071b74..2ca2db3 100644 (file)
@@ -117,7 +117,7 @@ def EVAL(ast, env)
             if a2 && a2[0] == :"catch*"
                 return EVAL(a2[2], Env.new(env, [a2[1]], [exc]))
             else
-                raise esc
+                raise exc
             end
         end
     when :do