From: Mark Guzman Date: 2006-12-20T08:05:53+09:00 Subject: Re: ruby gotchas Gavin Kistner wrote: > From: Mark Guzman [mailto:segfault@hasno.info] > >> I've written up some ruby gotchas that have come up while using ruby. >> I'm wondering if there are any other gotchas that I should be >> aware of. >> The list is available at: >> http://hasno.info/2006/12/14/ruby-gotchas-and-caveats >> > > A nice list. I don't think I can add any to that, because your list > largely seems to stem from what violated your personal expectations. For > example, I'm used to JavaScript and Lua where the logical AND and OR > operators (by their various names) do act as guards that return the > first value that answers the question, never 'producing' a boolean > value. Additionally, nil and false are the only non-truth values in Lua, > too. > Yes, I should probably qualify it at the start. I'm coming from a java/c#/c background and a lot of things stem from that. > One comment about your item #8 - you might want to mention that 1.0/2 or > 1/2.0 *is* 0.5. Your wording implies (to the novice reader) that you > need to include 'mathn' for math to work properly. > Good point, I'll update it. --mark -- sic transit gloria et adulescentia blog | http://hasno.info wiki | http://wiki.hasno.info