Actions
Feature #20469
closedAdd a JSON addition for Enumerator::ArithmeticSequence
Status:
Third Party's Issue
Assignee:
-
Target version:
-
Description
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
##
# 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.
Actions
Like0
Like0Like0