Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6461
| From | Simon Krahnke <overlord@gmx.li> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: parentheses and newlines |
| Date | 2012-02-18 20:56 +0100 |
| Organization | there's no z in organisation |
| Message-ID | <87haynhq4i.fsf@xts.gnuu.de> (permalink) |
| References | <139b9140-b002-4300-b43a-38db39cab653@bs8g2000vbb.googlegroups.com> |
* jsnark <swr@monmouth.com> (2012-02-17) schrieb: >Can anyone explain the following behavior? I would expect both >expressions to fail, but the first unexpectedly succeeds. > >$ irb --version >irb 0.9.6(09/06/30) >$ ruby --version >ruby 1.9.2p136 (2010-12-25) [x86_64-linux] >$ irb >irb(main):001:0> (2 >irb(main):002:1> 3) >=> 3 >irb(main):003:0> (2 3) >SyntaxError: (irb):3: syntax error, unexpected tINTEGER, expecting ')' >(2 3) > ^ > from /usr/local/ruby-1.9.2/bin/irb:12:in `<main>' Same behaviour in ruby with eval. So no irb problem. mfg, simon .... l
Back to comp.lang.ruby | Previous | Next — Previous in thread | Find similar
parentheses and newlines jsnark <swr@monmouth.com> - 2012-02-17 06:01 -0800 Re: parentheses and newlines Robert Klemme <shortcutter@googlemail.com> - 2012-02-17 16:33 +0100 Re: parentheses and newlines Simon Krahnke <overlord@gmx.li> - 2012-02-18 20:56 +0100
csiph-web