mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Docs: Fix rendering of SyntaxError#path
This commit is contained in:
parent
65920cfc40
commit
91076b2c59
Notes:
git
2022-12-23 16:10:10 +00:00
1 changed files with 6 additions and 2 deletions
8
error.c
8
error.c
|
@ -3028,12 +3028,16 @@ Init_Exception(void)
|
|||
rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
|
||||
rb_define_method(rb_eSyntaxError, "initialize", syntax_error_initialize, -1);
|
||||
|
||||
/* RDoc will use literal name value while parsing rb_attr,
|
||||
* and will render `idPath` as an attribute name without this trick */
|
||||
ID path = idPath;
|
||||
|
||||
/* the path failed to parse */
|
||||
rb_attr(rb_eSyntaxError, idPath, TRUE, FALSE, FALSE);
|
||||
rb_attr(rb_eSyntaxError, path, TRUE, FALSE, FALSE);
|
||||
|
||||
rb_eLoadError = rb_define_class("LoadError", rb_eScriptError);
|
||||
/* the path failed to load */
|
||||
rb_attr(rb_eLoadError, idPath, TRUE, FALSE, FALSE);
|
||||
rb_attr(rb_eLoadError, path, TRUE, FALSE, FALSE);
|
||||
|
||||
rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue