diff options
author | zverok <zverok.offline@gmail.com> | 2019-12-29 22:55:23 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-01-06 15:13:35 +0900 |
commit | 41ef6df8c93039aa1cd4a37e380a13cbfbc4d62f (patch) | |
tree | d49b78f8174b699cacbd5cfb6852edd2baac9b25 /ext | |
parent | 2e5ef30cb9f56e5a7a8139e0f1d75bbcf5ee8362 (diff) | |
download | ruby-41ef6df8c93039aa1cd4a37e380a13cbfbc4d62f.tar.gz |
[flori/json] Fix examples syntax
https://github.com/flori/json/commit/3845491d92
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/lib/json.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb index ec9b571be2..151d9c2f26 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. |