Joel VanderWerf <vjoel / PATH.Berkeley.EDU> wrote: > It's very nice. I hope it ends up on the ruby-lang site or somewhere > comparable. Thankyou. So do I. > One minor problem. In recent versions of ruby, > > "hello".gsub("[^aeiou]") ... > > will not treat "[^aeiou]" as a regex but as a literal string, and > there will be a warning. So for compatibility this should be > > "hello".gsub(/[^aeiou]/) ... Thanks. I'll fix that. > Also, something you might want to point out that would appeal even to > people who are still going to use Python for general purpose > programming: Ruby, like Perl, is great for one-liners. (This was > pointed out as an advantage over Python in http://ruby-talk.org/45398) > I'm sure folks on this list will come up with many examples, if you > want them... Mmm.. that's true although I was going to vaguely refer to that in the lecture (that Ruby generally allows you to chain methods together on an object, and that sometimes your entire Ruby program ends up one line as a result). I'll make it clearer that this lets you do powerful one-liners from the command line... maybe give a little demonstration with ruby -pe '...' -- Greg McIntyre greg / puyo.cjb.net http://puyo.cjb.net