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

dkubb / memoizable / 91 / 10
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: upgrade/dependencies
DEFAULT BRANCH: master
Ran 13 Dec 2013 07:13AM UTC
Files 5
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

13 Dec 2013 07:00AM UTC coverage: 100.0%. First build
jruby-head, JRUBY_OPTS="$JRUBY_OPTS --debug"

push

travis-ci

dkubb
Change memoized method to not accept a block

* This is done because it is not possible to memoize a method that
  accepts a block.

  A method with a block could only be memoized if it were possible
  to know if the block provided was the same as an earlier block.
  However, each time a method executes the block has a new
  object_id. Also and it ranges from difficult to unsupported or
  impossible (depending on the ruby implementation) to get the
  block source.

  Not only would the source be necessary, but the runtime state of
  the block AST would be needed to compare against earlier seen
  blocks because it can reference anything within the current
  binding scope.

  Even heroic attempts like that in https://github.com/ngty/sourcify
  have a long list of caveats that make it inappropriate to use in
  a gem that is expected to always return the correct cached value.

  For these reasons and others it is currently impossible to memoize
  a method that accepts a block.

[Fix #6]

103 of 103 relevant lines covered (100.0%)

18.96 hits per line

Source Files on job 91.10 (jruby-head, JRUBY_OPTS="$JRUBY_OPTS --debug")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 91
  • Travis Job 91.10
  • c54f29dd on github
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