1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rss/maker/base.rb (RSS::Maker::ItemsBase#normalize): fixed

strange RSS::Maker::Item#max_size behavior.
  Thanks to Kazuhiko <kazuhiko@fdiary.net>.

* test/rss/test_maker_1.0.rb (RSS::TestMaker10#test_items): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2005-09-16 23:40:34 +00:00
parent ab28565b7e
commit dcaeabb076
3 changed files with 67 additions and 1 deletions

View file

@ -401,7 +401,11 @@ EOC
end
def normalize
sort_if_need[0..@max_size]
if @max_size >= 0
sort_if_need[0...@max_size]
else
sort_if_need[0..@max_size]
end
end
def current_element(rss)