diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-11 13:12:16 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-11 13:12:16 +0000 |
commit | 40068896b33ebb5cee697f34033393a992024210 (patch) | |
tree | 57cba6585d28095f744388db3e167892bdb50396 /lib | |
parent | 82ce0ebdb2684431f24d04a9bdee68f01ddee4c1 (diff) | |
download | ruby-40068896b33ebb5cee697f34033393a992024210.tar.gz ruby-40068896b33ebb5cee697f34033393a992024210.tar.xz ruby-40068896b33ebb5cee697f34033393a992024210.zip |
* lib/rss/xml-stylesheet.rb (RSS::XMLStyleSheet#initialize):
kept backward compatibility.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rss/xml-stylesheet.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rss/xml-stylesheet.rb b/lib/rss/xml-stylesheet.rb index 66e3161dd..559d6bcd5 100644 --- a/lib/rss/xml-stylesheet.rb +++ b/lib/rss/xml-stylesheet.rb @@ -35,6 +35,10 @@ module RSS attr_accessor(*ATTRIBUTES) attr_accessor(:do_validate) def initialize(*attrs) + if attrs.size == 1 and + (attrs.first.is_a?(Hash) or attrs.first.is_a?(Array)) + attrs = attrs.first + end @do_validate = true ATTRIBUTES.each do |attr| __send__("#{attr}=", nil) |