summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/rss/rexmlparser.rb6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e9b013f763..813ee940b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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