From 75ada77b9664c1d1f0ae6e210f8db4919849561e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 2 Dec 2021 16:42:41 +0900 Subject: Doc: Improve documentation on JSON#parse and JSON#parse! Co-authored-by: Bruno Gomes da Silva --- ext/json/ext/parser/parser.c | 1 + ext/json/ext/parser/parser.rl | 1 + 2 files changed, 2 insertions(+) (limited to 'ext') diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index b1dc881..b7de60d 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/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/ext/parser/parser.rl b/ext/json/ext/parser/parser.rl index f7be1a5..15e6b92 100644 --- a/ext/json/ext/parser/parser.rl +++ b/ext/json/ext/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) { -- cgit v1.2.1