Brian Candler wrote:
> R.. Kumar 1.9.1 OSX wrote:
>> /opt/local/lib/ruby1.9/1.9.1/pathname.rb:270: warning: `*' interpreted
>> as argument prefix
> 
> Can you post line 270 of that file, with a few lines of context?
> 
> Can you replicate the problem standalone? e.g.
> 
 #!/usr/bin/ruby19 -w
 require 'pathname'

The above is enough to give the error.

1. I do not want to fix the problem in my own copy of ruby 1.9 and have 
it keep returning when i upgrade versions, or have others get it.

2. While googling, I found that the problem was fixed in 1.8.x but 
perhaps not in 1.9. Is that the case ?

The code in pathname.rb is

 259   # Return a pathname which is substituted by String#sub.
 260   def sub(pattern, *rest, &block)
 261     if block
 262       path = @path.sub(pattern, *rest) {|*args|
 263         begin
 264           old = Thread.current[:pathname_sub_matchdata]
 265           Thread.current[:pathname_sub_matchdata] = $~
 266           eval("$~ = Thread.current[:pathname_sub_matchdata]", 
block.binding)
 267         ensure
 268           Thread.current[:pathname_sub_matchdata] = old
 269         end
 270         yield *args
 271       }
 272     else
 273       path = @path.sub(pattern, *rest)
 274     end
 275     self.class.new(path)
 276   end
-- 
Posted via http://www.ruby-forum.com/.