coatl / redparse

RedParse is a ruby parser written in pure ruby.
redparse.rubyforge.org
GNU Lesser General Public License v2.1
24 stars 2 forks source link

warning thrown #7

Open rdp opened 14 years ago

rdp commented 14 years ago

expected?

C:/ruby/lib/ruby/gems/1.8/gems/redparse-0.8.4/lib/redparse.rb:237: warning: method redefined; discarding old reduce

r

coatl commented 14 years ago

yeah, I see it too. I'll try to fix it, but as of right now, I can't see/remember where the other definition of reduce is, or why it exists.

rdp commented 14 years ago

gem loading problem?

coatl commented 14 years ago

doubt it

rdp commented 14 years ago

interesting.

With 1.8.6 I get just the one warning, however with 1.9, I get:


e:\dev\digitalarchive_trunk>ruby -v test.rb
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32]
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/reg-0.4.8/assert.rb:21: warning: global variable `$Debug' not initialized
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redparse-0.8.4/lib/redparse/node.rb:326: warning: method redefined; discarding old lvalue
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redparse-0.8.4/lib/redparse/node.rb:349: warning: method redefined; discarding old char
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redparse-0.8.4/lib/redparse/node.rb:354: warning: method redefined; discarding old string
E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redparse-0.8.4/lib/redparse.rb:247: warning: method redefined; discarding old reduce

hmm            
coatl commented 14 years ago

I don't recall seeing the $Debug one before. MRI 1.9 is definitely more thorough about finding redefinitions of methods. (As can be seen, for instance, by running redparse unit tests.) Anyway, thanks for the report, I'll try to get these others resolved too.