Skip to content
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 specs for hash key ends with ! or ? #1148

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

koic
Copy link
Contributor

@koic koic commented Apr 18, 2024

This PR adds several spec for the following syntax errors:

$ ruby -cve '{a!:}'
ruby 3.4.0dev (2024-04-18T03:46:51Z master b3c59370ca) [x86_64-darwin23]
-e:1: identifier a! is not valid to get
ruby: compile error (SyntaxError)

$ ruby -cve '{a?:}'
ruby 3.4.0dev (2024-04-18T03:46:51Z master b3c59370ca) [x86_64-darwin23]
-e:1: identifier a? is not valid to get
ruby: compile error (SyntaxError)

This addition supplements some specs for the non-omitting value hash notation.

This PR adds several spec for the following syntax errors:

```console
$ ruby -cve '{a!:}'
ruby 3.4.0dev (2024-04-18T03:46:51Z master b3c59370ca) [x86_64-darwin23]
-e:1: identifier a! is not valid to get
ruby: compile error (SyntaxError)

$ ruby -cve '{a?:}'
ruby 3.4.0dev (2024-04-18T03:46:51Z master b3c59370ca) [x86_64-darwin23]
-e:1: identifier a? is not valid to get
ruby: compile error (SyntaxError)
```

This addition supplements some specs for the non-omitting value hash notation.
@eregon eregon merged commit 1afa2ea into ruby:master Apr 18, 2024
14 checks passed
@koic koic deleted the add_specs_for_hash_value_omissions branch April 18, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants