aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-14 07:28:43 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-14 07:28:43 +0000
commitf42a7c09513b5f73e21e6fae881f3bc2f760b9af (patch)
tree871f68a1eb5e21cb290165a3372d31eac3745bab
parenta2884195e7461ce42ad19e52a1cdd55ac9e3f315 (diff)
downloadruby-f42a7c09513b5f73e21e6fae881f3bc2f760b9af.tar.gz
* test/erb/test_erb.rb (test_html_escape): add assertions for the
cases where the argument is not a String. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/erb/test_erb.rb3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5cbd59b0ae..fc8ae2c2a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 14 16:25:46 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * test/erb/test_erb.rb (test_html_escape): add assertions for the
+ cases where the argument is not a String.
+
Tue Aug 14 16:03:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (check_valid_dir): reject "..." as directory name.
diff --git a/test/erb/test_erb.rb b/test/erb/test_erb.rb
index e3bc54a61f..fc1e1fcbc6 100644
--- a/test/erb/test_erb.rb
+++ b/test/erb/test_erb.rb
@@ -46,6 +46,9 @@ class TestERB < Test::Unit::TestCase
assert_equal("", ERB::Util.html_escape(""))
assert_equal("abc", ERB::Util.html_escape("abc"))
assert_equal("&lt;&lt;", ERB::Util.html_escape("<<"))
+
+ assert_equal("", ERB::Util.html_escape(nil))
+ assert_equal("123", ERB::Util.html_escape(123))
end
end