From: Gennady Bystritsky Date: 2007-01-15T03:14:01+09:00 Subject: Re: possible to un-warn? David Chelimsky wrote: > Hi all, > > I'm working on implementing expectation matchers in rspec, so > instead of this: > > cat.should_eat "tuna" > > you would write this: > > cat.should eat "tuna" > > Now the rub is that this generates "warning: parenthesize argument(s) > for future version". The thing is that, in this case, we know with > some certainty that everything after "eat" is an argument to "eat", > and that the result of "eat" is an argument to "should". It used not to warn in Ruby 1.6.4, by the way. I also experienced the same problem when moving to Ruby 1.8.2 in my package manager facility (http://sf.net/projects/tsc-tpm) that I am going to release soon (after almost 3 years of active development and use in a number of commercial projects). I have a Ruby-based DSL there for package description, that used to have statements like these: generate as 'bin/act', source program "project/act.rb" install into 'lib/test/accept', source ruby 'project' => 'test/accept/action.rb' I had to change it to: generate.as('bin/act').source.program "project/act.rb" install.into('lib/test/accept').source.ruby 'project' => 'test/accept/action.rb' And I like the resulting syntax so much better :-) Gennady Bystritsky.