From: "Brian Schröder" Date: 2005-11-04T22:43:11+09:00 Subject: Re: Some comments on new 1.9 features On 04/11/05, Trans wrote: > Just looking at http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9. > Nicely done! > > Comment on a couple things > > 1) ;; instead of end > > It is possible to use ;; instead of end. > > (1..100).inject do |s,x| > s+x > ;; # => 5050 > > class Foo > def foo; "foo" end > ;; > Foo.new.foo # => "foo" > > What's the rationle here? I'd rather have a punctutation mark for 'do' > (yes, ':' again ;-p) > > (1..100).inject: |s,x| > s+x > end # => 5050 > > Of course could have both: > > (1..100).inject: |s,x| > s+x > ;; # => 5050 > > Please don't add ;; thats 1) Sheer uglyness 2) Parses as a noop operation. Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/