зеркало из https://github.com/github/ruby.git
5fa28ce015
This PR makes `Prism` warn `&` interpreted as argument prefix. This carries a similar meaning to the following Ruby warning: ```console $ ruby -cwe "foo &bar" -e:1: warning: `&' interpreted as argument prefix Syntax OK ``` Previously, it did not issue a warning: ```console $ bundle exec ruby -rprism -ve "p Prism.parse('foo &bar').warnings" ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] [] ``` From now on, it will issue a warning similar to Ruby's: ```console $ bundle exec ruby -rprism -ve "p Prism.parse('foo &bar').warnings" ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22] [#<Prism::ParseWarning @type=:ambiguous_prefix_amp @message="ambiguous `&` has been interpreted as an argument prefix" @location=#<Prism::Location @start_offset=4 @length=1 start_line=1> @level=:verbose>] ``` https://github.com/ruby/prism/commit/312f99cd1e |
||
---|---|---|
.. | ||
templates | ||
util | ||
api_pack.c | ||
config.yml | ||
defines.h | ||
encoding.c | ||
encoding.h | ||
extension.c | ||
extension.h | ||
node.h | ||
options.c | ||
options.h | ||
pack.c | ||
pack.h | ||
parser.h | ||
prettyprint.h | ||
prism.c | ||
prism.h | ||
regexp.c | ||
regexp.h | ||
static_literals.c | ||
static_literals.h | ||
version.h |