summaryrefslogtreecommitdiff
path: root/ext/json/lib
diff options
context:
space:
mode:
authorzverok <zverok.offline@gmail.com>2019-12-29 22:55:23 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-01-06 15:13:35 +0900
commit41ef6df8c93039aa1cd4a37e380a13cbfbc4d62f (patch)
treed49b78f8174b699cacbd5cfb6852edd2baac9b25 /ext/json/lib
parent2e5ef30cb9f56e5a7a8139e0f1d75bbcf5ee8362 (diff)
[flori/json] Fix examples syntax
https://github.com/flori/json/commit/3845491d92
Diffstat (limited to 'ext/json/lib')
-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 ec9b571be2d..151d9c2f26f 100644
--- a/ext/json/lib/json.rb
+++ b/ext/json/lib/json.rb
@@ -45,7 +45,7 @@ require 'json/common'
# Or an alternative way:
#
# require 'json'
-# puts {:hello => "goodbye"}.to_json # => "{\"hello\":\"goodbye\"}"
+# puts({:hello => "goodbye"}.to_json) # => "{\"hello\":\"goodbye\"}"
#
# <tt>JSON.generate</tt> only allows objects or arrays to be converted
# to JSON syntax. <tt>to_json</tt>, however, accepts many Ruby classes
@@ -53,7 +53,7 @@ require 'json/common'
#
# require 'json'
#
-# 1.to_json => "1"
+# 1.to_json # => "1"
#
# The {#generate}[rdoc-ref:JSON#generate] method accepts a variety of options
# to set the formatting of string output and defining what input is accepteable.