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

YorickPeterse / ruby-lint / 369 / 2

Build:
DEFAULT BRANCH: master
Ran 05 Mar 2014 10:59PM UTC
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

05 Mar 2014 10:53PM UTC coverage: 98.242% (+0.001%) from 98.241%
2.0.0

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.

1788 of 1820 relevant lines covered (98.24%)

9616.44 hits per line

Source Files on job 369.2 (2.0.0)
  • Tree
  • List 0
  • Changed 22
  • Source Changed 1
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 369
  • Travis Job 369.2
  • 08c80f60 on github
  • Prev Job for 2.0.0 on master (#368.2)
  • Next Job for 2.0.0 on master (#370.2)
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