am-kantox / dry-behaviour Goto Github PK
View Code? Open in Web Editor NEWTiny library inspired by Elixir protocol pattern.
License: MIT License
Tiny library inspired by Elixir protocol pattern.
License: MIT License
NoMethodError:
private method `warn' called for nil:NilClass
TracePoint
, disallow modifications when consolidated;@spec[string, user => any | hash]
Hi,
I think invoking methods defined by defmethod
/defimpl
with keyword arguments is not working correctly on Ruby 3.2.0.
I discovered this while trying to upgrade my app from 2.7 to 3.2 and was able to verify the failure by cloning the repo and running the tests.
Repro:
git clone [email protected]:am-kantox/dry-behaviour.git
cd dry-behavior
bundle
bundle exec rspec spec/dry/behaviour_spec.rb
Failure: "works for default and keyword args (FAILED - 1)"
Error: "ArgumentError: wrong number of arguments (given 0, expected 1+)"
I'm seeing the same behavior in my app when trying to invoke a method with a positional and default keyword argument.
I'll see if I can locate the source of the issue and make a PR, but any guidance you can offer would be helpful.
Thanks!
Check whether the protocol was fully implemented (in the very last line of defimpl
handler) and raise
or at least warn
.
When the definition of the method has an arity that differs from the implementation we should print the error message to the log and optionally raise
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.