tyrauber / stock_quote

A ruby gem that retrieves stock quotes from IEX
MIT License
211 stars 55 forks source link

Stack level too deep because of self referencial method 'history' #50

Closed pacifists closed 6 years ago

pacifists commented 6 years ago

.history method not working, because it just self references itself As a result it gives

s = StockQuote::Stock.history('SPY', '2016-11-30', '2016-11-30', 'json')
SystemStackError: stack level too deep
    from (irb):3

Because the method is defined as:

def self.history(symbol, start_date=nil, end_date=nil, format=nil)
  self.history(symbol, start_date, end_date, format)
end
tyrauber commented 6 years ago

Thanks @pacifists, @dblock also caught this and created a pull request. Merged and version bumped to 1.5.4. Thanks for the feedback, let us know if you experience any other issues.