From fadde099e637e875d382d9182651e4d7f23dcc76 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 20 Oct 2018 04:41:19 +0000 Subject: ast.c: Fix the documents of `RubyVM::AST.parse` and `RubyVM::AST.parse_file` * ast.c: r63602 fixed to raise `SyntaxError` when `RubyVM::AST.parse` or `RubyVM::AST.parse_file` fail to parse input. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ast.c') diff --git a/ast.c b/ast.c index 128a806a1d..b5f40fad57 100644 --- a/ast.c +++ b/ast.c @@ -58,7 +58,7 @@ ast_new_internal(rb_ast_t *ast, NODE *node) * Parses the given string into an abstract syntax tree, * returning the root node of that tree. * - * Returns nil if the given string is invalid syntax. + * SyntaxError is raised if the given string is invalid syntax. * * RubyVM::AST.parse("x = 1 + 2") * # => # @@ -92,7 +92,7 @@ rb_ast_s_parse(VALUE module, VALUE str) * Reads the file from pathname, then parses it like ::parse, * returning the root node of the abstract syntax tree. * - * Returns nil if pathname's contents are not + * SyntaxError is raised if pathname's contents are not * valid Ruby syntax. * * RubyVM::AST.parse_file("my-app/app.rb") -- cgit v1.2.3