diff options
author | zverok <zverok.offline@gmail.com> | 2019-12-29 22:55:23 +0200 |
---|---|---|
committer | zverok <zverok.offline@gmail.com> | 2019-12-29 22:55:23 +0200 |
commit | 3845491d92c27cf55a8962f8c23429eaafda036f (patch) | |
tree | 263a83e705e17f1dae12b28f57f102a0b5ec06da | |
parent | 4ede0a7d1957bab4df69c81ef0808c83f0930931 (diff) | |
download | json-3845491d92c27cf55a8962f8c23429eaafda036f.tar.gz |
Fix examples syntax
-rw-r--r-- | lib/json.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/json.rb b/lib/json.rb index ec9b571..151d9c2 100644 --- a/lib/json.rb +++ b/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. |