summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzverok <zverok.offline@gmail.com>2020-01-03 00:02:26 +0200
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2020-01-05 14:35:14 +0900
commit54fd50c951d7bee259bcbc491bf223fb992d12c9 (patch)
treee3bfc4d1ce1af6632bc262f494b6083cd133fb52 /lib
parentc7af1e432aed4c4586dd1e62b0431c14fa44289d (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2810
Diffstat (limited to 'lib')
-rw-r--r--lib/ostruct.rb5
1 files changed, 2 insertions, 3 deletions
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
#