• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

YorickPeterse / ruby-lint / 369

Build:
DEFAULT BRANCH: master
Ran 05 Mar 2014 10:59PM UTC
Jobs 4
Files 61
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
369

push

travis-ci

YorickPeterse
Recursion guard in RubyObject#lookup.

This prevents the lookup method from entering an infinite loop when performing
lookups in recursive data structures.

Two examples of this are Logger and Logger::Severity. Logger includes the
Logger::Severity module which in turn should inherit from the Logger module. As
an example, take the following snippet:

    class Example < Logger
    end

When trying to perform some kind of lookup on the Example class, e.g. an
instance variable, the following lookup path would be used:

    Example -> Logger -> Logger::Severity -> Logger -> Logger::Severity -> etc

This is due to the Logger definition specifying Logger::Severity as a parent
with the latter doing the same but in the opposite manner.

The recursion guard in this case keeps track of parent definitions already used
in a lookup and skips these. It's a bit dirty that this is even needed in the
first place. Once again I'll have to look into alternatives for the current
definition system. Perhaps I should resort to performing live lookups based on
the current environment again as earlier ruby-lint versions did.

This fixes #108.

2053 of 2096 relevant lines covered (97.95%)

34083.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 369.1 (1.9.3) 05 Mar 2014 10:59PM UTC 0
98.24
Travis Job 369.1
2 369.2 (2.0.0) 05 Mar 2014 10:59PM UTC 0
98.24
Travis Job 369.2
3 369.3 (2.1.0) 05 Mar 2014 10:59PM UTC 0
98.24
Travis Job 369.3
4 369.4 (rbx-2.2) 05 Mar 2014 11:07PM UTC 0
98.8
Travis Job 369.4
Source Files on build 369
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #369
  • 08c80f60 on github
  • Prev Build on master (#368)
  • Next Build on master (#370)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc