-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RubyVM::AbstractSyntaxTree #2292
Conversation
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。 | ||
|
||
#@samplecode | ||
# => (SCOPE@1:0-1:50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
出力例しかないので、 IO などの例にあるように File.write
と組み合わせた例にしておくと良さそうです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
何故かコードを貼り付けるのを忘れていたみたいです 💦
0dfb3db
|
||
@param proc Procもしくはメソッドオブジェクトを指定します。 | ||
|
||
#@samplecode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
irb で試すと Errno::ENOENT
になるようなので、 @raise
を追加したり、サンプルコードに注意書きを追加すると良さそうです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RDoc の方で書かれていないのに @raise
を足すべきか微妙だなと思ったのと、サンプルコード特有の問題ではなくて一般に起こりうる問題なので、本文に説明を足してみました。
|
||
--- first_column -> Integer | ||
|
||
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0-origin でバイト単位という説明もあると良さそうです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(fisrt|last)_(column|line) に説明を足しました 🙆♂️
|
||
--- first_lineno -> Integer | ||
|
||
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1-origin という説明もあると良さそうです。
|
||
--- last_column -> Integer | ||
|
||
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも 0-origin でバイト単位という説明があると良さそうです。
|
||
--- last_lineno -> Integer | ||
|
||
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも 1-origin という説明があると良さそうです。
#1977