markbates / markbates/cachetastic
infinite recursion
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 18
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
The following programme fails (tested in 3.6.0 because of issue #1):
```
require 'cachetastic'
class MyCache < Cachetastic::Cache; end
MyCache.set(1, 'hello')
```
The reported error:
```
vendor/ruby/gems/cachetastic-3.6.0/lib/cachetastic/cache.rb:127: stack level too deep (SystemStackError)
```
The code around cache.rb:127:
```
module Cachetastic
class Cache
include Singleton
...
def to_configatron(*args) # :nodoc:
self.class.to_configatron(*args)
end
...
end
end
```
I don't know what this is supposed to do, but it results in `to_configatron` to be called recursively. I can fix this is my code by overriding `to_configatron`.
Am I missing something?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example from the issue, then inspect vendor/ruby/gems/cachetastic-3.6.0/lib/cachetastic/cache.rb around line 127 and the to_configatron method. Trace the instance-to-class delegation and determine the expected behavior; the sample should complete without a SystemStackError or recursive to_configatron calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100