mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
REXML hadn't been tested with Ruby 1.8.0, which was really, really,
unbelievably stupid of me. There were a lot of warnings and some errors that were caused by Block vs. Proc differences; these have been fixed. REXML passes all of the tests under Ruby 1.8.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4d33715fe4
commit
2403ad9e7d
5 changed files with 28 additions and 26 deletions
|
@ -185,7 +185,7 @@ module REXML
|
|||
end
|
||||
|
||||
def add( pair )
|
||||
if pair[-1].kind_of? Proc
|
||||
if pair[-1].kind_of? Proc or (defined? Block and pair[-1].kind_of? Block)
|
||||
@procs << pair unless @procs.include? pair
|
||||
else
|
||||
@listeners << pair unless @listeners.include? pair
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue