diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 11:33:50 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-06 11:33:50 +0000 |
commit | cbcb626ee5110ccf752309683d04654e0a83585f (patch) | |
tree | ffbcfa52d83421e16437dd5ee25cddd91b2bd261 | |
parent | 0d59cd79cc791047842a98d210b5a35267ba3602 (diff) | |
download | ruby-cbcb626ee5110ccf752309683d04654e0a83585f.tar.gz |
* lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for
backward compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/rss/parser.rb | 14 | ||||
-rw-r--r-- | lib/rss/rss.rb | 29 |
3 files changed, 6 insertions, 42 deletions
@@ -1,3 +1,8 @@ +Tue Feb 6 20:29:44 2007 Kouhei Sutou <kou@cozmixng.org> + + * lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for + backward compatibility. + Tue Feb 6 18:43:17 2007 Shugo Maeda <shugo@ruby-lang.org> * lib/net/ftp.rb: moved fixes for EPIPE to the correct diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index e272978992..96be12f748 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -1,17 +1,5 @@ require "forwardable" -begin - require "open-uri" -rescue LoadError - require "uri" -end -unless Kernel.methods.include?("URI") - module Kernel - def URI(uri_str) # :doc: - URI.parse(uri_str) - end - module_function :URI - end -end +require "open-uri" require "rss/rss" diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index f424f16171..77a8584884 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -30,35 +30,6 @@ class Time end end -module Enumerable - unless instance_methods.include?("sort_by") - def sort_by - collect do |x| - [yield(x), x] - end.sort do |x, y| - x[0] <=> y[0] - end.collect! do |x| - x[1] - end - end - end -end - -class Hash - unless instance_methods.include?("merge") - def merge(other) - dup.update(other) - end - end -end - -module Kernel - unless methods.include?("funcall") - def funcall(*args, &block) - __send__(*args, &block) - end - end -end require "English" require "rss/utils" |