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

tycooon / memery / 90 / 4
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 10 Feb 2020 12:58PM UTC
Files 2
Run time 0s
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

10 Feb 2020 12:57PM UTC coverage: 100.0%. Remained the same
2.7

push

travis-ci

web-flow
Fix memoization with Hash-like objects as parameters (#25)

After adding `**kwargs` due to warnings in Ruby 2.7,
Hash-like parameters (with `#to_hash` method) convert to Hash
while passed in dynamically created by Memery method.
For example, instances of `Sequel::Model`.

Found Ruby bug: https://bugs.ruby-lang.org/issues/14909

So, changes will be in Ruby 2.8.

And for now we can:

1.  Use `**(;{})` as the additional parameter at method call, what is ugly.
2.  Define memoized methods with `eval` and exactly expected arguments,
    what is dangerous (eval is evil).
3.  Suppress warnings about keyword arguments until here are no failing tests.

First, I've chose the 3th.

But then Jeremy Evans suggest to use `ruby2_keywords`. So, here we're!

Additional line of code offensed RuboCop (method length),
so I was forced to refactor method definition.

281 of 281 relevant lines covered (100.0%)

4.0 hits per line

Source Files on job 90.4 (2.7)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 84
  • Travis Job 90.4
  • 0c65d19b on github
  • Prev Job for 2.7 on master (#88.4)
  • Next Job for 2.7 on master (#91.4)
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