Mon-Ouie / coolline

Simple readline-like tool able to change representation of input
Other
82 stars 14 forks source link

SyntaxError when trying to use keywords (def, if, class, module, etc.) #4

Closed kyrylo closed 12 years ago

kyrylo commented 12 years ago

That's on HEAD.

~/code/coolline[master]% ruby -v     
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

~/code/coolline[master]% ruby repl.rb
>> class Geronimo                                                                                                                                              
repl.rb:29:in `eval': (eval):1: syntax error, unexpected $end (SyntaxError)
        from repl.rb:29:in `block in <main>'
        from repl.rb:25:in `loop'
        from repl.rb:25:in `<main>'

~/code/coolline[master]% ruby repl.rb
>> if 1                                                                                                                                                        
repl.rb:29:in `eval': (eval):1: syntax error, unexpected $end (SyntaxError)
        from repl.rb:29:in `block in <main>'
        from repl.rb:25:in `loop'
        from repl.rb:25:in `<main>'

~/code/coolline[master]% ruby repl.rb
>> def banzai                                                                                                                                                  
repl.rb:29:in `eval': (eval):1: syntax error, unexpected $end (SyntaxError)
        from repl.rb:29:in `block in <main>'
        from repl.rb:25:in `loop'
        from repl.rb:25:in `<main>'
kyrylo commented 12 years ago

I have a feeling that I completely missed the point of coolline and this is the intentional behaviour.

Mon-Ouie commented 12 years ago

Yeah, it's just he repl.rb script that's not smart enough to detect the end of an expression. It's just a quick script to check if it actually works as expected, not a full-fledged REPL. ;)

kyrylo commented 12 years ago

I realized that in 5 minutes after posting this issue :)