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

M

Minkoo Seo

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 Seo
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: ruby -w and '(...) interpreted as grouped expression'"

|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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top