Created
November 30, 2008 18:09
-
-
Save Narnach/30494 to your computer and use it in GitHub Desktop.
Am I doing something wrong or is this a bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run with reia bad.re | |
# It will output: | |
# exception: {exception, | |
# {throw, | |
# {tuple, | |
# {error, | |
# {tuple, | |
# {17, | |
# {list,{[],"syntax error before: '|'"}}}}}}}} | |
# stacktrace: [{'Eval',string,1}, | |
# {'Loader',eval_input,1}, | |
# {init,start_it,1}, | |
# {init,start_em,1}] | |
[1,2,3].each do |n| | |
puts(n.to_s()) | |
[1,2,3].each {|a| puts(a.to_s())} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reia Interactive Shell (prerelease) | |
Running on Erlang (BEAM) emulator version 5.6.5 [source] [smp:2] [async-threads:0] [hipe] [kernel-poll:true] | |
>> [1,2,3].each do |n| | |
.. puts(n.to_s()) | |
.. | |
1 | |
2 | |
3 | |
=> [1,2,3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run with reia good.re | |
# It will output: | |
# 1 | |
# 2 | |
# 3 | |
# 1 | |
# 2 | |
# 3 | |
[1,2,3].each {|a| puts(a.to_s())} | |
[1,2,3].each do |n| | |
puts(n.to_s()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define the do-block in a class | |
# This executes as expected | |
class InClass | |
def dothis | |
[1,2,3].each do |n| | |
Local.puts(n.to_s()) | |
InClass.start().dothis() | |
puts("lala") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment