From 54fd50c951d7bee259bcbc491bf223fb992d12c9 Mon Sep 17 00:00:00 2001 From: zverok Date: Fri, 3 Jan 2020 00:02:26 +0200 Subject: Fix OpenStructDocumentation In https://github.com/ruby/ruby/commit/9be3295d53b6fd9f8a3ad8157aa0655b1976d8ac, OpenStruct's documentation stopped to be rendered by RDoc (there should be no additional code between documentation comment and documented class). Fixing this. --- lib/ostruct.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/ostruct.rb b/lib/ostruct.rb index c40c897ff6..a151fc0bed 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -9,6 +9,8 @@ # See OpenStruct for an example. # +require_relative 'ostruct/version' + # # An OpenStruct is a data structure, similar to a Hash, that allows the # definition of arbitrary attributes with their accompanying values. This is @@ -72,9 +74,6 @@ # the objects that are created, as there is much more overhead in the setting # of these properties compared to using a Hash or a Struct. # - -require_relative 'ostruct/version' - class OpenStruct # -- cgit v1.2.3