Ruby 1.9 compatibility: Avoid calling #to_s on Arrays

[#249 state:resolved]
This commit is contained in:
Jakub Kuźma 2009-05-26 10:41:00 +02:00 committed by Bryan Helmkamp
parent b75ff6221b
commit 8b98540aef
2 changed files with 11 additions and 9 deletions

View File

@ -24,6 +24,7 @@
* Bug fixes
* Translate CSS and image paths with single quotes in save_and_open_page (Erin Staniland)
* Ruby 1.9 compatibility: Avoid calling #to_s on Arrays (Jakub Kuźma)
== 0.4.4 / 2009-04-06

View File

@ -134,7 +134,8 @@ module Webrat
end
def escaped_value
CGI.escape(@value.to_s)
value = @value.respond_to?(:join) ? @value.join : @value
value ? CGI.escape(value) : ""
end
def labels