You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foo2 = 'dummy2'
result = begin
foo = 'dummy'
foo
ensure
foo = foo2
end
puts result, result.class
It works differently under MRI 2.2.1 and JRuby 9.0.1.0:
MRI 2.2.1:
dummy
JRuby 9.0.1.0:
dummy2
Most cases this won't be problem, but when you want to execute a block of code with a variable temporarily set to another values using the begin....ensure technique, you will get unwanted result. For example, tilt will not be able process erb files with JRuby due to this.
The text was updated successfully, but these errors were encountered:
Given code:
It works differently under MRI 2.2.1 and JRuby 9.0.1.0:
MRI 2.2.1:
JRuby 9.0.1.0:
Most cases this won't be problem, but when you want to execute a block of code with a variable temporarily set to another values using the
begin....ensure
technique, you will get unwanted result. For example,tilt
will not be able process erb files with JRuby due to this.The text was updated successfully, but these errors were encountered: