Re:"Useless Ruby sugar": Argument forwarding
by viralpraxis on Friday November 24, 2023 @04:39PM
(#38408670)
I’ve been using the same structure for years :)
But I prefer to replace ‘raise NotImplementedError’ with ´raise “Not Implemeneted”’ because that exception has different semantics (method unavailability on the current platform)
Re:"Useless Ruby sugar": Argument forwarding
by prognostikos on Saturday November 25, 2023 @02:54AM
(#38412025)
I also avoid `NotImplementedError` as it inherits from `Error` instead of `StandardError`. This can bring down services like job queue processors that rescue `StandardError`.
Re:"Useless Ruby sugar": Argument forwarding
by still_grokking on Saturday November 25, 2023 @03:48AM
(#38412216)
What is this code good for?
I can understand what it does but I don't get the intend behind that. (I'm not a Ruby programmer, so maybe I miss something "obvious")
This is the most common way I use it: