meadvillerb/onstomp — Issue #15: Misnamed instance variable in receipt scope
Author: iande
Created: 2012-02-21 12:40:42+00:00
State: open

From Paul Gale:

When I attempted to use the scope 'with_receipt' feature I discovered a bug. It would explode rather spectacularly with the the top of the stack trace looking like:

undefined method `subscribe_frame' for nil:NilClass
/home/tworker/work/stomp/vendor/bundle/jruby/1.8/gems/onstomp-1.0.5/lib/onstomp/interfaces/frame_methods.rb:122:in `subscribe'

At first I thought I was doing something wrong. However, the invocation seemed so simple, and just like the documentation, that I found it hard to imagine what I could be doing wrong.

I cracked open the code when I noticed a typo on line 12 of http://github.com/meadvillerb/onstomp/blob/master/lib/onstomp/components/scopes/receipt_scope.rb. The last 'n' of 'connection' is missing. As a consequence the attr_reader for :connection always returns nil as there is no variable backing it.