General

Profile

JustJosh (Joshua Stowers)

  • Login: JustJosh
  • Registered on: 03/31/2017
  • Last sign in: 02/26/2025

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 2 4

Activity

02/27/2025

05:05 PM Ruby Feature #21160: Local return from proc
nobu (Nobuyoshi Nakada) wrote in #note-3:
> Why not rescue `LocalJumpError`?
That is definitely a better solution than requiring developers to use `next`.
Thank you for the suggestion.
As I understand it, the reason `break` doesn...
JustJosh (Joshua Stowers)
12:47 AM Ruby Feature #21160: Local return from proc
ufuk (Ufuk Kayserilioglu) wrote in #note-1:
> `next` isn't necessarily the correct thing to use here, `break` is:
I've tried `break` without success - I get `LocalJumpError: break from proc-closure`
Here is a more complete example...
JustJosh (Joshua Stowers)

02/26/2025

11:31 PM Ruby Feature #21160 (Open): Local return from proc
When writing DSL-style helper methods, I often store block arguments as procs to use as callbacks.
Using `return` in a proc will return from the context it was created in, which is unsuitable in the following example.
Since procs canno...
JustJosh (Joshua Stowers)

01/14/2020

10:08 PM Ruby Misc #15843: Make "trunk" a symbolic-ref of "master" on git.ruby-lang.org
The "List of maintainers" link is now broken on this page: https://bugs.ruby-lang.org/projects/ruby/wiki/Maintainers
It currently links to: https://github.com/ruby/ruby/blob/trunk/doc/maintainers.rdoc
instead of: https://github.com/r...
JustJosh (Joshua Stowers)

12/19/2019

04:52 AM Ruby Feature #16039: Array#contains? to check if one array contains another array
@sawa - I 100% agree with what you are saying. I did a poor job expressing my concerns.
I am nervous that singling out array arguments in the abbreviated form could result in confusion and misuse. This is not a problem for `Range#cove...
JustJosh (Joshua Stowers)

12/18/2019

07:11 PM Ruby Feature #16039: Array#contains? to check if one array contains another array
# *#cover?*
I do not think we should use the name `cover?` because the types of arguments accepted by `Range#cover?` would be incompatible with this use case.
For example:
```ruby
(1..3).cover?(2) # true
```
But if Array's implem...
JustJosh (Joshua Stowers)

12/13/2019

11:27 PM Ruby Bug #15882: OpenSSL::X509::Name.parse usage
Thanks for the patch.
Since there wasn't any recent movement, I submitted a pull request with it as requested by jeremyevans0.
I made sure to credit you in the commit description since you did all the work.
https://github.com/ruby...
JustJosh (Joshua Stowers)

06/19/2017

03:28 PM Ruby Feature #13657: Simplify usage of Enumerable#reject
Great! You're right, that will accomplish this _exactly_.
Do you see any hope in adding this functionality to `#reject` regardless of the existence of `#grep_v`?
This other method is difficult to make sense of unless the developers a...
JustJosh (Joshua Stowers)

06/14/2017

03:08 AM Ruby Feature #13551: Add a method to alias class methods
I think Robert is exactly right.
I've hoped for such a method on several occasions myself, but highly dislike cluttering up the codebase with logic that is difficult to understand.
One of the best things about Ruby is that when written...
JustJosh (Joshua Stowers)
02:40 AM Ruby Feature #13657 (Rejected): Simplify usage of Enumerable#reject
The reject method is more complicated than it has to be when removing only a specific value.
It would be convenient if we could just plug in the value we wish to delete as an optional argument, for example:
~~~ ruby
[1, 2, 3, 4].rej...
JustJosh (Joshua Stowers)

Also available in: Atom