From: ahoward Date: 2003-04-18T01:44:21+09:00 Subject: Re: Cryptic -w warning: ambiguous first argument; make sure ... On Fri, 18 Apr 2003, Yukihiro Matsumoto wrote: > Hi, > > In message "Cryptic -w warning: ambiguous first argument; make sure ..." > on 03/04/18, Johan Holmberg writes: > > |I wrote something like > | > | str = "banana" > | str.gsub! /a/, "*" > | puts str > | > |When running this this with the -w option I get the following > |warning: > | > | ex1.rb:4: warning: ambiguous first argument; make sure > > make sure whether what you wrote is either > > * regexp as the first argument > * division "str.gsub! / a" > > wrap arguments with parentheses, if you don't want to see the > warning. the trend seems to be the poetry mode is evil, and being phased out. is that fair to say? i for one, love writing open path, 'r' vs open(path, 'r') and even then would prefer open (path, 'r') in case of extreme nesting - for clarity but i appear to be in the minority ;-) -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ara.t.howard@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================