summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2016-02-25 00:46:45 +0100
committerFlorian Frank <flori@ping.de>2016-02-25 00:46:45 +0100
commit4922d2ae6cf93d14f7d51d416f518b5945935b3a (patch)
treea112556a783db0b231d0328ca9538c8cf7884dca /tests
parent4dec168abb84a9175549e8d03a95a57df6a384e7 (diff)
downloadjson-4922d2ae6cf93d14f7d51d416f518b5945935b3a.tar.gz
Check for existence of #to_json method before call
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_json_generate.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_json_generate.rb b/tests/test_json_generate.rb
index cc8e7cd..95c9266 100755
--- a/tests/test_json_generate.rb
+++ b/tests/test_json_generate.rb
@@ -342,7 +342,7 @@ EOT
undef to_json
end
assert_nothing_raised(SystemStackError) do
- assert_equal '[""]', JSON.generate([s.new])
+ assert_equal '["foo"]', JSON.generate([s.new('foo')])
end
end
end