[DOC] Fix outdated results in examples

Some example results in the docs no longer match what Ruby prints:

* Array#flatten and Array#flatten!: Set#inspect now shows Set[6, 7]
* Module: Mod.constants also includes Math::DomainError
* Module#const_get and Module#const_set: Floats are shown with full
  precision
* Complex#imag: sin(PI/4) is 0.7071067811865475
* String#<<: missing # in #<Encoding:UTF-8>
* Enumerable#inject: typo #=>>
This commit is contained in:
Shourya Singh authored and Nobuyoshi Nakada committed 2026-10-21 17:52:28 +09:00
1 parent 536dc6f98b
commit cfa50b0093
5 files changed
+22 -22
Notes: git 2026-10-21 08:53:01 +00:00

No files matched your search

+1 -1
View File
@@ -1021,7 +1021,7 @@ ary_inject_op(VALUE ary, VALUE init, VALUE op)
* end
*
* position = "nnneesw".chars.reduce(Turtle.new, :move)
* position #=>> #<Turtle:0x00000001052f4698 @y=2, @x=1>
* position #=> #<Turtle:0x00000001052f4698 @y=2, @x=1>
*
* <b>Third Shortcut: Reducer With no Initial Value</b>
*