ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:117764] [Ruby master Feature#20469] Add a JSON addition for Enumerator::ArithmeticSequence
@ 2024-05-03 19:11 shan (Shannon Skipper) via ruby-core
  2024-05-04 15:45 ` [ruby-core:117775] " shan (Shannon Skipper) via ruby-core
  0 siblings, 1 reply; 2+ messages in thread
From: shan (Shannon Skipper) via ruby-core @ 2024-05-03 19:11 UTC (permalink / raw
  To: ruby-core; +Cc: shan (Shannon Skipper)

Issue #20469 has been reported by shan (Shannon Skipper).

----------------------------------------
Feature #20469: Add a JSON addition for Enumerator::ArithmeticSequence
https://bugs.ruby-lang.org/issues/20469

* Author: shan (Shannon Skipper)
* Status: Open
----------------------------------------
There's a JSON addition for `Range` but one wasn't added for `Enumerator::ArithmeticSequence` when it was introduced. This little PR adds a JSON addition for ArithmeticSequence for parity with a normal Range. https://github.com/ruby/ruby/pull/10720/files

``` ruby
##
# Already supported
require 'json/add/range'
(0..42).to_json

##
# Proposed addition
require 'json/add/arithmetic_sequence'
((0..42) % 3).to_json
```

I was curious about adding it to `add/core.rb` but it seems like that could be considered separately, especially since there are classes like Set that could also be considered for inclusion now that it's a core class.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:117775] [Ruby master Feature#20469] Add a JSON addition for Enumerator::ArithmeticSequence
  2024-05-03 19:11 [ruby-core:117764] [Ruby master Feature#20469] Add a JSON addition for Enumerator::ArithmeticSequence shan (Shannon Skipper) via ruby-core
@ 2024-05-04 15:45 ` shan (Shannon Skipper) via ruby-core
  0 siblings, 0 replies; 2+ messages in thread
From: shan (Shannon Skipper) via ruby-core @ 2024-05-04 15:45 UTC (permalink / raw
  To: ruby-core; +Cc: shan (Shannon Skipper)

Issue #20469 has been updated by shan (Shannon Skipper).


I just realized I filed my PR in the wrong place since JSON is a gem. (Sorry for the noise.) I closed the previous PR and opened one in the JSON gem repo. https://github.com/flori/json/pull/583

----------------------------------------
Feature #20469: Add a JSON addition for Enumerator::ArithmeticSequence
https://bugs.ruby-lang.org/issues/20469#change-108182

* Author: shan (Shannon Skipper)
* Status: Open
----------------------------------------
There's a JSON addition for `Range` but one wasn't added for `Enumerator::ArithmeticSequence` when it was introduced. This little PR adds a JSON addition for ArithmeticSequence for parity with a normal Range. https://github.com/ruby/ruby/pull/10720/files

``` ruby
##
# Already supported
require 'json/add/range'
(0..42).to_json

##
# Proposed addition
require 'json/add/arithmetic_sequence'
((0..42) % 3).to_json
```

I was curious about adding it to `add/core.rb` but it seems like that could be considered separately, especially since there are classes like Set that could also be considered for inclusion now that it's a core class.



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-04 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03 19:11 [ruby-core:117764] [Ruby master Feature#20469] Add a JSON addition for Enumerator::ArithmeticSequence shan (Shannon Skipper) via ruby-core
2024-05-04 15:45 ` [ruby-core:117775] " shan (Shannon Skipper) via ruby-core

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).