jarhart/rattler — pull request #3 by wconrad (2014-06-21 10:45:13+00:00)
Title: calc example exits cleanly on end of input

In Linux, end-of-input (control-d) leaves a minor mess:

```
wayne@mercury:~/lab/rattler/gem$ examples/calc.rb

> 1 + 2
3.0

> /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/parser.rb:35:in `initialize': no implicit conversion of nil into String (TypeError)
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/parser.rb:35:in `new'
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/parser.rb:35:in `initialize'
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/recursive_descent_parser.rb:25:in `initialize'
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/packrat_parser.rb:16:in `initialize'
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/extended_packrat_parser.rb:16:in `initialize'
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/parser.rb:15:in `new'
from /home/wayne/.rvm/gems/ruby-2.1.1/gems/rattler-0.6.0/lib/rattler/runtime/parser.rb:15:in `parse!'
from examples/calc.rb:31:in `block in

'
from examples/calc.rb:27:in `loop'
from examples/calc.rb:27:in `

'
```

This just cleans that up:

```
wayne@mercury:~/lab/rattler/gem$ examples/calc.rb

> 1 + 2
3.0

>
wayne@mercury:~/lab/rattler/gem$
```

Nothing Earth shattering. Just a little cosmetic adjustment.