summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authorShannon Skipper <[email protected]>2025-01-08 20:53:49 -0800
committerGitHub <[email protected]>2025-01-09 13:53:49 +0900
commit841555245d770df88a0c8079fc97a51ffa7ef8e9 (patch)
tree6ab690fa9d3aa68d36834bf3f8bd7e8ece822f9d /struct.c
parentdd80d9b089e35729d585bae2f8866c845c48f3b7 (diff)
[DOC] Show `NONE` within `Measure` namespace (#12274)
Keep `NONE` within `Measure`
Notes
Notes: Merged-By: nobu <[email protected]>
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/struct.c b/struct.c
index 45f90c414c..7cfc1f2a16 100644
--- a/struct.c
+++ b/struct.c
@@ -1759,7 +1759,8 @@ rb_data_define(VALUE super, ...)
* important for redefining initialize in order to convert arguments or provide
* defaults:
*
- * Measure = Data.define(:amount, :unit) do
+ * Measure = Data.define(:amount, :unit)
+ * class Measure
* NONE = Data.define
*
* def initialize(amount:, unit: NONE.new)
@@ -1768,7 +1769,7 @@ rb_data_define(VALUE super, ...)
* end
*
* Measure.new('10', 'km') # => #<data Measure amount=10.0, unit="km">
- * Measure.new(10_000) # => #<data Measure amount=10000.0, unit=#<data NONE>>
+ * Measure.new(10_000) # => #<data Measure amount=10000.0, unit=#<data Measure::NONE>>
*
*/