Closed aunghtain closed 4 months ago
https://github.com/floraison/fugit/actions/runs/8087932820/job/22100915876 no 2.2.6, but no luck with 2.2.10 :-(
@aunghtain Hello and thanks for the detailed report!
I have trouble finding a Ruby 2.2.x or 2.2.6 to test directly, neither on GitHub Actions, neither for my development station (some kind of compile error). Could you please test this include Enumerable
version on your Ruby 2.2.6 and tell me if that fixes it?
When we are successful, I will release a fugit 1.10.1.
It still gives me the same error.
/usr/share/rvm/gems/ruby-2.2.6/bundler/gems/fugit-4c12b6120f20/lib/fugit.rb:16:in `require': /usr/share/rvm/gems/ruby-2.2.6/bundler/gems/fugit-4c12b6120f20/lib/fugit/cron.rb:323: syntax error, unexpected tIDENTIFIER, expecting '<' or ';' or '\n' (SyntaxError)
class CronIterator include Enumerable
^
But if I move the include to a new line, it works fine.
class CronIterator
include Enumerable
Also, this works.
class CronIterator
include ::Enumerable
Well done! I will change and release 1.10.1. Thanks a lot!
1.10.1 released https://rubygems.org/gems/fugit/versions/1.10.1
Please tell me if it works for you.
Thanks!
1.10.1 works! Thank you so much @jmettraux
@aunghtain You're welcome! Well done!
Issue description
The latest version (1.10.0) with ruby 2.2.6 gives the following error.
/usr/share/rvm/gems/ruby-2.2.6/gems/fugit-1.10.0/lib/fugit.rb:16:in
require': /usr/share/rvm/gems/ruby-2.2.6/gems/fugit-1.10.0/lib/fugit/cron.rb:323: syntax error, unexpected tIDENTIFIER, expecting '<' or ';' or '\n' (SyntaxError) class CronIterator include ::Enumerable ^ from /usr/share/rvm/gems/ruby-2.2.6/gems/fugit-1.10.0/lib/fugit.rb:16:in
<top (required)>'How to reproduce
I'm using it in rails with rufus-scheduler 3.6.0. After bundle install, I try to start rails console
I got the above error.
Error and error backtrace (if any)
Expected behaviour
Rails starts console without any issues.
Context
Please replace the content of this section with the output of the following commands:
Additional context
If I downgrade to 1.9.0, it works fine.