From: Brian Candler Date: 2011-01-15T17:36:17+09:00 Subject: Re: What are your ruby rough cuts ? Here are a few things I can think of: * Regexp ^ and $ work match more than just start and end of string. For example, /^abc$/ does not match only "abc" but also "rm -rf /*\nabc" * http://innig.net/software/ruby/closures-in-ruby.rb * Using write accessors: you must write self.foo=123 instead of foo=123 (the latter sets a local variable) * Similarly, having to use self.class instead of class * auto-splat * class variables (@@foo), just try working out the semantics * Lots of junk inherited from Perl, such as implicit operations on $_ and flip-flop operator * Spaces are semantically important, even within a line puts (-3).abs # prints 3 puts(-3).abs # raises NoMethodError * The whole of ruby 1.9 String handling is arguably one huge paper cut. http://github.com/candlerb/string19 Regards, Brian. -- Posted via http://www.ruby-forum.com/.