diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-17 02:33:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-17 02:33:34 +0000 |
commit | 53f6129bbe578ea0033b85619f924c5f9d7bdad2 (patch) | |
tree | 346b18721ed1e87dd419d8d947f992edb714c513 | |
parent | 3fac2b2519f4af1eceeaf4f900364d1ebe7ed8da (diff) | |
download | ruby-53f6129bbe578ea0033b85619f924c5f9d7bdad2.tar.gz |
* lib/rss/rexmlparser.rb: REXML version may be 4 digits.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/rss/rexmlparser.rb | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Tue Feb 17 11:33:30 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/rss/rexmlparser.rb: REXML version may be 4 digits. + Tue Feb 17 10:45:59 2004 NAKAMURA Usaku <usa@ruby-lang.org> * ext/syck/rubyext.c (syck_emitter_end_object): takes only one arg. diff --git a/lib/rss/rexmlparser.rb b/lib/rss/rexmlparser.rb index 541ff82fc3..5a8cc2ac5a 100644 --- a/lib/rss/rexmlparser.rb +++ b/lib/rss/rexmlparser.rb @@ -1,9 +1,9 @@ require "rexml/document" require "rexml/streamlistener" -/\A(\d+)\.(\d+).\d+\z/ =~ REXML::Version -if $1.to_i < 2 or ($1.to_i == 2 and $2.to_i < 5) - raise LoadError +/\A(\d+)\.(\d+)(?:.\d+)+\z/ =~ REXML::Version +if ([$1.to_i, $2.to_i] <=> [2, 5]) < 0 + raise LoadError, "needs REXML 2.5 or later (#{REXML::Version})" end module RSS |