Skip to content

Add tests for sample dir and tweak samples#217

Merged
hsbt merged 2 commits intoruby:masterfrom
hkdnet:sample-test
May 30, 2023
Merged

Add tests for sample dir and tweak samples#217
hsbt merged 2 commits intoruby:masterfrom
hkdnet:sample-test

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.

hkdnet added 2 commits May 27, 2023 00:01
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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants