Forum: Ruby ruby -w and '(...) interpreted as grouped expression'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Minkoo S. (Guest)
on 2006-03-11 10:19
(Received via mailing list)
Hi all.

I've encountered enigmatic error message while learning rdoc. This is
the simple program which tests RDoc:

#!/usr/local/bin/ruby -w

# == Synopsis
# Test synopsis

require "optparse"
require "rdoc/usage"

opts = OptionParser.new
opts.on("-h", "--help") { RDoc::usage }
opts.parse(ARGV) rescue RDoc::usage('usage')

puts "hello"


When I run above program like './test.rb', ruby says
"/usr/local/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:46: warning: (...)
interpreted as grouped expression"

Why is this warning raised? I have no idea what grouped expression is.

Sincerely,
Minkoo S.
Yukihiro M. (Guest)
on 2006-03-11 10:25
(Received via mailing list)
Hi,

In message "Re: ruby -w and '(...) interpreted as grouped expression'"
    on Sat, 11 Mar 2006 17:18:47 +0900, "Minkoo S."
<removed_email_address@domain.invalid> writes:

|When I run above program like './test.rb', ruby says
|"/usr/local/lib/ruby/1.8/rdoc/ri/ri_formatter.rb:46: warning: (...)
|interpreted as grouped expression"
|
|Why is this warning raised? I have no idea what grouped expression is.

It's caused by a space before argument parenthesis.  I just removed it
from the source code.  Thank you.

							matz.
This topic is locked and can not be replied to.