summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
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>>
*
*/