iande / onstomp

A STOMP messaging client library for Ruby

Home Page:http://mathish.com/projects/onstomp.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misnamed instance variable in receipt scope

iande opened this issue · comments

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
.../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.