rubychan / coderay

Fast and easy syntax highlighting for selected languages, written in Ruby.
http://coderay.rubychan.de/
Other
846 stars 115 forks source link

Fix test suite for ruby 3.0 change for methods on subclass of Array #255

Closed mtasaka closed 3 years ago

mtasaka commented 3 years ago

With ruby 3.0, especially with https://github.com/ruby/ruby/pull/3690 , for subclass of Array, flatten method now returns the instance of Array, not of the subclass.

To keep the object instance of the subclass, use flatten! instead.

Fixes #254

codeclimate[bot] commented 3 years ago

Code Climate has analyzed commit c1c15034 and detected 0 issues on this pull request.

View more on Code Climate.

junaruga commented 3 years ago

@rubychan Could you take a look at this PR? You can also add Ruby 3.0 case to this repo's Travis CI to see the result. Thanks.

korny commented 3 years ago

Thank you for the fix!