summaryrefslogtreecommitdiff
path: root/ext/json
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-12-02 16:42:41 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-05-20 17:49:13 +0900
commit767f3904ee2a15575c292d89578de7669f169346 (patch)
treee2b1c286676e3a53e0964017b4b2977abcbab158 /ext/json
parenta37051ef3b455a808b32d72561d50b8610d917ce (diff)
[flori/json] Doc: Improve documentation on JSON#parse and JSON#parse!
https://github.com/flori/json/commit/75ada77b96 Co-authored-by: Bruno Gomes da Silva <brunojabs@gmail.com>
Diffstat (limited to 'ext/json')
-rw-r--r--ext/json/parser/parser.c1
-rw-r--r--ext/json/parser/parser.rl1
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index b1dc8810c3..b7de60ddfb 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -2950,6 +2950,7 @@ static const char MAYBE_UNUSED(_JSON_nfa_pop_trans)[] = {
*
* Parses the current JSON text _source_ and returns the complete data
* structure as a result.
+* It raises JSON::ParseError if fail to parse.
*/
static VALUE cParser_parse(VALUE self)
{
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
index f7be1a5acc..15e6b929f5 100644
--- a/ext/json/parser/parser.rl
+++ b/ext/json/parser/parser.rl
@@ -839,6 +839,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
*
* Parses the current JSON text _source_ and returns the complete data
* structure as a result.
+ * It raises JSON::ParseError if fail to parse.
*/
static VALUE cParser_parse(VALUE self)
{