{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/865b368c39d7db3ab3f20f7b9bd83303?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"865b368c39d7db3ab3f20f7b9bd83303","url":"https://api.github.com/users/hrigu","login":"hrigu","id":788751},"milestone":null,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/45f0a9e50c449a18f81bebcb6ff34543?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"45f0a9e50c449a18f81bebcb6ff34543","url":"https://api.github.com/users/obrie","login":"obrie","id":6991},"labels":[],"updated_at":"2011-11-10T12:05:02Z","closed_at":null,"comments":2,"url":"https://api.github.com/repos/pluginaweek/state_machine/issues/140","body":"given: a state machine with two states. Each state defines a method with the same name.\r\nWhen I call the method of the second state\r\nThen the program ends in an endless loop\r\n\r\n```ruby\r\nrequire 'rspec'\r\nrequire 'state_machine'\r\n\r\nclass StateWithBehavior\r\n  state_machine initial: :idle do\r\n    event :go do\r\n      transition :idle => :running\r\n      transition :running => :idle\r\n    end\r\n    state :idle do\r\n      def go\r\n        puts \"start\"\r\n        super\r\n      end\r\n    end\r\n    state :running do\r\n      def go\r\n        puts \"stop\"\r\n        super\r\n      end\r\n    end\r\n  end\r\nend\r\n\r\ndescribe StateWithBehavior do\r\n  subject { StateWithBehavior.new }\r\n  it \"has idle as initial state\" do\r\n    subject.state_name.should == :idle\r\n    subject.go  #<-works fine\r\n    subject.state_name.should == :running\r\n    subject.go #<-endless loop\r\n    subject.state_name.should == :idle\r\n  end\r\nend\r\n```","html_url":"https://github.com/pluginaweek/state_machine/issues/140","title":"endless loop when two methods in different states have the same name","number":140,"id":2183351,"created_at":"2011-11-09T05:32:44Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/45f0a9e50c449a18f81bebcb6ff34543?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"45f0a9e50c449a18f81bebcb6ff34543","url":"https://api.github.com/users/obrie","login":"obrie","id":6991},"updated_at":"2011-11-10T12:05:02Z","url":"https://api.github.com/repos/pluginaweek/state_machine/issues/comments/2694452","body":"Thanks for reporting this issue!  I was able to reproduce it, using Ruby 1.9.1.  The behavior appears significantly different in Ruby 1.8.7.  I'll take a look at this and let you know what I find.","id":2694452,"created_at":"2011-11-10T12:05:02Z"}}