[前][次][番号順一覧][スレッド一覧]

ruby-changes:59624

From: zverok <ko1@a...>
Date: Sun, 5 Jan 2020 14:35:33 +0900 (JST)
Subject: [ruby-changes:59624] 54fd50c951 (master): Fix OpenStructDocumentation

https://git.ruby-lang.org/ruby.git/commit/?id=54fd50c951

From 54fd50c951d7bee259bcbc491bf223fb992d12c9 Mon Sep 17 00:00:00 2001
From: zverok <zverok.offline@g...>
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.

diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index c40c897..a151fc0 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -9,6 +9,8 @@ https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L9
 # 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 @@ https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L74
 # 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 v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]