From: "shan (Shannon Skipper) via ruby-core" Date: 2024-05-03T19:11:13+00:00 Subject: [ruby-core:117764] [Ruby master Feature#20469] Add a JSON addition for Enumerator::ArithmeticSequence 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/