mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
merge revision(s) 117d6e145a0270ab8fc9134403519ef13b9ebb24: [Backport #21027]
[ruby/prism] Fix `not` receiver `not foo` should be `!foo` `not()` should be `!nil` Fixes [Bug #21027] https://github.com/ruby/prism/commit/871ed4b462
This commit is contained in:
parent
a1679f0d83
commit
7c315e2398
@ -15254,11 +15254,12 @@ parse_expression_prefix(pm_parser_t *parser, pm_binding_power_t binding_power, b
|
||||
accept1(parser, PM_TOKEN_NEWLINE);
|
||||
|
||||
if (accept1(parser, PM_TOKEN_PARENTHESIS_LEFT)) {
|
||||
arguments.opening_loc = PM_LOCATION_TOKEN_VALUE(&parser->previous);
|
||||
pm_token_t lparen = parser->previous;
|
||||
|
||||
if (accept1(parser, PM_TOKEN_PARENTHESIS_RIGHT)) {
|
||||
arguments.closing_loc = PM_LOCATION_TOKEN_VALUE(&parser->previous);
|
||||
receiver = (pm_node_t *) pm_parentheses_node_create(parser, &lparen, NULL, &parser->previous);
|
||||
} else {
|
||||
arguments.closing_loc = PM_LOCATION_TOKEN_VALUE(&parser->previous);
|
||||
receiver = parse_expression(parser, PM_BINDING_POWER_COMPOSITION, true, PM_ERR_NOT_EXPRESSION);
|
||||
pm_conditional_predicate(receiver);
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||
#define RUBY_VERSION_TEENY 7
|
||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||
#define RUBY_PATCHLEVEL 140
|
||||
#define RUBY_PATCHLEVEL 141
|
||||
|
||||
#include "ruby/version.h"
|
||||
#include "ruby/internal/abi.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user