poetics icon indicating copy to clipboard operation
poetics copied to clipboard

failed rule when defining a function

Open jc00ke opened this issue 14 years ago • 1 comments

> square = (x) -> x*x
@1:1 failed rule 'string', got 's'
> exit()
@1:1 failed rule 'string', got 's'
> Ctrl + c
@1:1 failed rule 'string', got 's'
> exit()
An exception occurred running /home/jesse/.rvm/gems/rbx-head-nhydra/bin/poetics
    Thread has been interrupted (Interrupt)

Backtrace:
   { } in Rubinius::Loader#signals at kernel/loader.rb:132
                Signal.run_handler at kernel/common/signal.rb:66
          Rubinius.received_signal at kernel/delta/rubinius.rb:219
                Readline.readline at .rvm/rubies/rbx-head-nhydra/lib
                                     /c-readline.rb:5
             Poetics::Script#repl at .rvm/gems/rbx-head-nhydra/gems
                                     /poetics-0.0.1/bin/poetics:111
             Poetics::Script#main at .rvm/gems/rbx-head-nhydra/gems
                                     /poetics-0.0.1/bin/poetics:136
                Object#__script__ at .rvm/gems/rbx-head-nhydra/gems
                                     /poetics-0.0.1/bin/poetics:140
               Kernel(Object)#load at kernel/common/kernel.rb:730
                 Object#__script__ at .rvm/gems/rbx-head-nhydra/bin/poetics:19
  Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
  Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:90
           Rubinius::Loader#script at kernel/loader.rb:592
             Rubinius::Loader#main at kernel/loader.rb:719
             Rubinius::Loader.main at kernel/loader.rb:758
        Object#script (__script__) at kernel/loader.rb:769

Can't exit easily from the REPL either.

jc00ke avatar May 03 '11 06:05 jc00ke

Hah, you rock. I'll get right on this.

Exiting the REPL is as easy as ^D.

To make it easier for typers, I'll add exit() and if you type quit(), I'll catch that and tell you to use exit().

brixen avatar May 03 '11 16:05 brixen