mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss/{trackback,syndication,dublincore,content}.rb: worked
with ruby 1.6 again. * test/rss/rss-assertions.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
74f6b8e7c9
commit
d9034d23ce
6 changed files with 63 additions and 39 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Mon Jul 5 23:56:42 2004 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* lib/rss/{trackback,syndication,dublincore,content}.rb: worked
|
||||||
|
with ruby 1.6 again.
|
||||||
|
|
||||||
|
* test/rss/rss-assertions.rb: ditto.
|
||||||
|
|
||||||
Mon Jul 5 22:54:39 2004 Tanaka Akira <akr@m17n.org>
|
Mon Jul 5 22:54:39 2004 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
* lib/uri/common.rb (Kernel#URI): new global method for parsing URIs.
|
* lib/uri/common.rb (Kernel#URI): new global method for parsing URIs.
|
||||||
|
|
|
@ -13,8 +13,10 @@ module RSS
|
||||||
|
|
||||||
ELEMENTS = []
|
ELEMENTS = []
|
||||||
|
|
||||||
def self.included(mod)
|
def self.append_features(klass)
|
||||||
mod.module_eval(<<-EOC)
|
super
|
||||||
|
|
||||||
|
klass.module_eval(<<-EOC)
|
||||||
%w(encoded).each do |x|
|
%w(encoded).each do |x|
|
||||||
install_text_element("\#{CONTENT_PREFIX}_\#{x}")
|
install_text_element("\#{CONTENT_PREFIX}_\#{x}")
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,8 +13,10 @@ module RSS
|
||||||
|
|
||||||
ELEMENTS = []
|
ELEMENTS = []
|
||||||
|
|
||||||
def self.included(mod)
|
def self.append_features(klass)
|
||||||
mod.module_eval(<<-EOC)
|
super
|
||||||
|
|
||||||
|
klass.module_eval(<<-EOC)
|
||||||
%w(title description creator subject publisher
|
%w(title description creator subject publisher
|
||||||
contributor type format identifier source
|
contributor type format identifier source
|
||||||
language relation coverage rights).each do |x|
|
language relation coverage rights).each do |x|
|
||||||
|
|
|
@ -13,8 +13,10 @@ module RSS
|
||||||
|
|
||||||
ELEMENTS = []
|
ELEMENTS = []
|
||||||
|
|
||||||
def self.included(mod)
|
def self.append_features(klass)
|
||||||
mod.module_eval(<<-EOC)
|
super
|
||||||
|
|
||||||
|
klass.module_eval(<<-EOC)
|
||||||
%w(updatePeriod updateFrequency).each do |x|
|
%w(updatePeriod updateFrequency).each do |x|
|
||||||
install_text_element("\#{SY_PREFIX}_\#{x}")
|
install_text_element("\#{SY_PREFIX}_\#{x}")
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,7 +11,6 @@ module RSS
|
||||||
|
|
||||||
module BaseTrackBackModel
|
module BaseTrackBackModel
|
||||||
def trackback_validate(tags)
|
def trackback_validate(tags)
|
||||||
raise unless @do_validate
|
|
||||||
counter = {}
|
counter = {}
|
||||||
%w(ping about).each do |x|
|
%w(ping about).each do |x|
|
||||||
counter["#{TRACKBACK_PREFIX}_#{x}"] = 0
|
counter["#{TRACKBACK_PREFIX}_#{x}"] = 0
|
||||||
|
@ -211,6 +210,7 @@ module RSS
|
||||||
EOC
|
EOC
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def new_with_content(klass, content)
|
def new_with_content(klass, content)
|
||||||
|
@ -227,7 +227,6 @@ module RSS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
class Ping < Element
|
class Ping < Element
|
||||||
include RSS09
|
include RSS09
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
# -*- tab-width: 2 -*- vim: ts=2
|
# -*- tab-width: 2 -*- vim: ts=2
|
||||||
|
module Test
|
||||||
|
module Unit
|
||||||
|
module Assertions
|
||||||
|
# For backward compatibility
|
||||||
|
unless instance_methods.include?("assert_raise")
|
||||||
|
def assert_raise(*args, &block)
|
||||||
|
assert_raises(*args, &block)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module RSS
|
module RSS
|
||||||
module Assertions
|
module Assertions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue