halostatue / diff-lcs

Generate difference sets between Ruby sequences.
http://halostatue.github.com/diff-lcs
Other
290 stars 57 forks source link

Warning in hunk.rb (overridden setter method) #3

Closed halostatue closed 13 years ago

halostatue commented 13 years ago

Ian MacLeod (http://rubyforge.org/users/nevir)

In hunk.rb, there's the following:

attr_accessor :flag_context
def flag_context=(context) #:nodoc:

Which causes the following warning to be emitted:

.../diff-lcs-1.1.2/lib/diff/lcs/hunk.rb:69: warning: method redefined; discarding old flag_context=

It seems like switching the attr macro from attr_accessor to attr_reader does the intended work

halostatue commented 13 years ago

Fixed.