piotrmurach / finite_machine

A minimal finite state machine with a straightforward syntax.
https://piotrmurach.github.io/finite_machine/
MIT License
808 stars 38 forks source link

Errors with Ruby 3.1.2 #75

Closed ghn closed 1 year ago

ghn commented 2 years ago

Describe the problem

Lots of warnings triggered when used with ruby 3.1.2

Steps to reproduce the problem

With ruby 3.1.2

bundle exec rspec

Actual behaviour

Error:

lib/finite_machine/observer.rb:22:in block in cleanup_callback_queue': undefined local variable or methodcallback_queue' for FiniteMachine::Observer:Class (NameError)

Expected behaviour

Specs pass without warnings

Describe your environment

ghn commented 2 years ago

Related PR https://github.com/piotrmurach/finite_machine/pull/74

dup2 commented 1 year ago

Would be nice to fix this and release, it is not usable on ruby 3.1+ otherwise