summaryrefslogtreecommitdiff
path: root/ext/json/lib/json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/lib/json.rb')
-rw-r--r--ext/json/lib/json.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb
index a96f4bc6121..8fc7e8300b3 100644
--- a/ext/json/lib/json.rb
+++ b/ext/json/lib/json.rb
@@ -150,8 +150,8 @@ require 'json/common'
#
# When the source is a Ruby \Integer or \Float, JSON.generate returns
# a \String containing a \JSON number:
-# JSON.generate(Integer(0)) # => "0""
-# JSON.generate(Float(1.0)) # => "1.0"
+# JSON.generate(42) # => "42"
+# JSON.generate(0.42) # => "0.42"
#
# When the source is a Ruby \String, JSON.generate returns
# a \String containing a \JSON string (with double-quotes):