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

ruby-changes:63116

From: BurdetteLamar <ko1@a...>
Date: Fri, 25 Sep 2020 17:29:11 +0900 (JST)
Subject: [ruby-changes:63116] 038252fe66 (master): [flori/json] Partial compliance with doc/method_documentation.rdoc

https://git.ruby-lang.org/ruby.git/commit/?id=038252fe66

From 038252fe66d4a81f21027e8204b782363a8516c8 Mon Sep 17 00:00:00 2001
From: BurdetteLamar <burdettelamar@y...>
Date: Thu, 20 Aug 2020 11:37:42 -0500
Subject: [flori/json] Partial compliance with doc/method_documentation.rdoc

https://github.com/flori/json/commit/6dfa885134

diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index 2f101e7..2e4aa2a 100644
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -7,8 +7,7 @@ module JSON https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/common.rb#L7
     # :call-seq:
     #   JSON[object] -> new_array or new_string
     #
-    # If +object+ is a
-    # {String-convertible object}[doc/implicit_conversion_rdoc.html#label-String-Convertible+Objects],
+    # If +object+ is a \String,
     # calls JSON.parse with +object+ and +opts+ (see method #parse):
     #   json = '[0, 1, null]'
     #   JSON[json]# => [0, 1, nil]
@@ -149,12 +148,9 @@ module JSON https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/common.rb#L148
   #
   # Returns the Ruby objects created by parsing the given +source+.
   #
-  # Argument +source+ contains the \String to be parsed. It must be a
-  # {String-convertible object}[doc/implicit_conversion_rdoc.html#label-String-Convertible+Objects]
-  # (implementing +to_str+), and must contain valid \JSON data.
+  # Argument +source+ contains the \String to be parsed.
   #
-  # Argument +opts+, if given, contains options for the parsing, and must be a
-  # {Hash-convertible object}[doc/implicit_conversion_rdoc.html#label-Hash+Convertible+Objects].
+  # Argument +opts+, if given, contains a \Hash of options for the parsing.
   # See {Parsing Options}[#module-JSON-label-Parsing+Options].
   #
   # ---
@@ -249,22 +245,17 @@ module JSON https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/common.rb#L245
   #
   # Argument +obj+ is the Ruby object to be converted to \JSON.
   #
-  # Argument +opts+, if given, contains options for the generation, and must be a
-  # {Hash-convertible object}[doc/implicit_conversion_rdoc.html#label-Hash-Convertible+Objects].
+  # Argument +opts+, if given, contains a \Hash of options for the generation.
   # See {Generating Options}[#module-JSON-label-Generating+Options].
   #
   # ---
   #
-  # When +obj+ is an
-  # {Array-convertible object}[doc/implicit_conversion_rdoc.html#label-Array-Convertible+Objects]
-  # (implementing +to_ary+), returns a \String containing a \JSON array:
+  # When +obj+ is an \Array, returns a \String containing a \JSON array:
   #   obj = ["foo", 1.0, true, false, nil]
   #   json = JSON.generate(obj)
   #   json # => '["foo",1.0,true,false,null]'
   #
-  # When +obj+ is a
-  # {Hash-convertible object}[doc/implicit_conversion_rdoc.html#label-Hash-Convertible+Objects],
-  # return a \String containing a \JSON object:
+  # When +obj+ is a \Hash, returns a \String containing a \JSON object:
   #   obj = {foo: 0, bar: 's', baz: :bat}
   #   json = JSON.generate(obj)
   #   json # => '{"foo":0,"bar":"s","baz":"bat"}'
@@ -436,8 +427,7 @@ module JSON https://github.com/ruby/ruby/blob/trunk/ext/json/lib/json/common.rb#L427
   #   BEWARE: This method is meant to serialise data from trusted user input,
   #   like from your own database server or clients under your control, it could
   #   be dangerous to allow untrusted users to pass JSON sources into it.
-  # - Argument +opts+, if given, contains options for the parsing, and must be a
-  #   {Hash-convertible object}[doc/implicit_conversion_rdoc.html#label-Hash+Convertible+Objects].
+  # - Argument +opts+, if given, contains a \Hash of options for the parsing.
   #   See {Parsing Options}[#module-JSON-label-Parsing+Options].
   #   The default options can be changed via method JSON.load_default_options=.
   #
-- 
cgit v0.10.2


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

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