General

Profile

svoop (Sven Schwyn)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 6 8

Activity

09/03/2021

09:03 PM Ruby Feature #18145: Rescue by nested exception
Both valid points, thanks for your suggestions... this issue can be closed IMO. svoop (Sven Schwyn)

09/02/2021

11:04 PM Ruby Feature #18145: Rescue by nested exception
@jeremyevans0 Nice one, thanks for the hint! I'll add this to a `ProviderError` and inherit from there. I guess this use case is too specific to add this `self.&` to `StandardError` or even `Exception` upstream? svoop (Sven Schwyn)
10:18 PM Ruby Feature #18145 (Closed): Rescue by nested exception
The introduction of `Exception#cause` helps a lot when debugging nested errors.
Same goes for wrapped errors. I'm not really sure whether such wrapped errors are an advisable pattern to begin with, feel free to comment on this, but I'...
svoop (Sven Schwyn)

05/06/2021

07:00 PM Ruby Feature #17844: Support list of methods to test with respond_to?
@byroot You're right of course, I'm so tuned in to keyword arguments. :-) Can be done in Ruby as `def respond_to?(*args)`, but you'd have to check the last args member for type. It might be more ore less ugly in C, I honestly know zilch ... svoop (Sven Schwyn)
08:18 AM Ruby Feature #17844: Support list of methods to test with respond_to?
@byroot You're right, breaking backward compatibility of the signature is out of the question. Not sure for C, but in plain Ruby, it's not a problem:
```ruby
def just_checkin(*methods, include_all: false)
puts methods.inspect, inc...
svoop (Sven Schwyn)
07:22 AM Ruby Feature #17844: Support list of methods to test with respond_to?
Fair point, but I don't think `respond_to_any?` is a real use case given `respond_to?` is mostly used to check whether an object implements the necessary interface: The information "it implements method1 OR method2" has little practical ... svoop (Sven Schwyn)

05/01/2021

01:01 PM Ruby Feature #17844 (Open): Support list of methods to test with respond_to?
Not sure whether this is a good idea at all, but I guess it doesn't hurt to put it up for debate.
The preferred way to check e.g. whether an argument is acceptable is by use of `respond_to?`:
```ruby
# Don't
def notify(recipien...
svoop (Sven Schwyn)

12/30/2020

06:46 PM Ruby Feature #17475: Implement arguments forwarding for blocks
Found it, duplicate of rejected #16605. Sorry for the noise, can be closed/rejected. svoop (Sven Schwyn)

12/26/2020

06:57 PM Ruby Feature #17475 (Rejected): Implement arguments forwarding for blocks
In a gem, I create a bunch of initializer shortcuts as follows:
# Shortcut initializers
CLASSES.each do |element, class_name|
define_singleton_method(element) do |*args, **kwargs|
class_name.to_class.new(*args...
svoop (Sven Schwyn)

02/27/2020

04:16 PM Ruby Misc #16659 (Open): Documentation on Regexp missing for absence pattern (?~pat)
The absence pattern `(?~pat)` available since Ruby 2.4.1 is [not yet documented on `Regexp`](https://git.ruby-lang.org/ruby.git/tree/doc/regexp.rdoc) as of today.
(Found it by coincidence reading [this article by Peter Cooper](https:...
svoop (Sven Schwyn)

Also available in: Atom