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') # => # - * Measure.new(10_000) # => #> + * Measure.new(10_000) # => #> * */