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 tests for sample dir and tweak samples #217

Merged
merged 2 commits into from
May 30, 2023
Merged

Conversation

hkdnet
Copy link
Contributor

@hkdnet hkdnet commented May 26, 2023

racc has samples. It's very nice for begineers. But some do not work with the latest ruby; TypeError: scan() yielded String (must be Array[2]) occurs. I fixed it by adding [] on array2.y and hash.y.

Tests are added to make sure samples are working. For better testability, $0 check is added to calc.y.

Samples are tweaked

- not to raise "TypeError: scan() yielded String (must be Array[2])"
- allow both script usage and lib usage by adding $0 check
@hkdnet
Copy link
Contributor Author

hkdnet commented May 29, 2023

I fixed the CI failure by adding -I option to use the current racc. An approval for CI run is welcome 😃

@hsbt hsbt merged commit 0df27b4 into ruby:master May 30, 2023
26 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Jun 8, 2023
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