diff --git a/CHANGELOG b/CHANGELOG index 65671e60..35c55e4f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Fixed compatibility issue with Ruby 1.9.1 + * In AR persistence, move state column from class level variables into the StateMachine object for the class * allowed :to array and :on_transition callback [Kevin Triplett] diff --git a/aasm.gemspec b/aasm.gemspec index 0e8ae535..6862b0aa 100644 --- a/aasm.gemspec +++ b/aasm.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.version = "2.0.5" s.summary = 'State machine mixin for Ruby objects' s.description = <<-EOF -AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects. +AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects. This fork adds Ruby 1.9.1 compatibility. EOF s.files = PKG_FILES s.require_path = 'lib' @@ -13,7 +13,7 @@ EOF s.extra_rdoc_files = ['README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGELOG'] s.rdoc_options = ['--line-numbers', '--inline-source', '--main', 'README.rdoc', '--title', 'AASM'] - s.author = 'Scott Barron' - s.email = 'scott@elitists.net' - s.homepage = 'http://github.com/rubyist/aasm' + s.author = 'Scott Barron, David Palm' + s.email = 'scott@elitists.net, dvdplm@gmail.com' + s.homepage = 'http://github.com/dvdplm/aasm' end diff --git a/lib/event.rb b/lib/event.rb index 1f3612e4..5589bf96 100644 --- a/lib/event.rb +++ b/lib/event.rb @@ -34,11 +34,11 @@ def transitions_from_state?(state) def execute_success_callback(obj) case success - when String, Symbol: + when String, Symbol obj.send(success) - when Array: + when Array success.each { |meth| obj.send(meth) } - when Proc: + when Proc success.call(obj) end end