codewars / runner

Issue tracker for Code Runner
34 stars 8 forks source link

Add arel for Ruby 3.0.0 #155

Open epeleh opened 2 years ago

epeleh commented 2 years ago

Please complete the following information about the package:

Following are optional, but will help us consider adding:

Recently I added a new Kata and it works fine on Ruby 2.5.0 but fails validation on Ruby 3.0.0 due to the missing gems. I consider that ideally, all the gems available in Ruby 2.5.0 should be available in Ruby 3.0.0 as well.

Both of these gems are already available in Ruby 2.5.0.


:+1: reaction might help to get this request prioritized.

FArekkusu commented 2 years ago

method_source - might be helpful for writing tests that validate a solution code

You can read the solution file instead.

epeleh commented 2 years ago

You can read the solution file instead.

Yep, you're right!

We can get a solution code by running:

File.read(RUBY_VERSION.to_i >= 3 ? 'lib/solution.rb' : 'solution.txt')

In our case, it should work even better than method(:solution).source. I updated the Kata - it no longer needs the method_source gem

Thanks! :+1:

kazk commented 2 years ago

You can read /workspace/solution.txt in all languages and versions.

I consider that ideally, all the gems available in Ruby 2.5.0 should be available in Ruby 3.0.0 as well.

I strongly disagree. Your list includes transitive dependencies, which we never claimed they're supported.