[前][次][番号順一覧][スレッド一覧]

ruby-changes:59630

From: zverok <ko1@a...>
Date: Mon, 6 Jan 2020 15:17:52 +0900 (JST)
Subject: [ruby-changes:59630] 41ef6df8c9 (master): [flori/json] Fix examples syntax

https://git.ruby-lang.org/ruby.git/commit/?id=41ef6df8c9

From 41ef6df8c93039aa1cd4a37e380a13cbfbc4d62f Mon Sep 17 00:00:00 2001
From: zverok <zverok.offline@g...>
Date: Sun, 29 Dec 2019 22:55:23 +0200
Subject: [flori/json] Fix examples syntax

https://github.com/flori/json/commit/3845491d92

diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb
index ec9b571..151d9c2 100644
--- a/ext/json/lib/json.rb
+++ b/ext/json/lib/json.rb
@@ -45,7 +45,7 @@ require 'json/common' https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json.rb#L45
 # 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' https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json.rb#L53
 #
 #   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.
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]