From 97f07f096843beec98c13063a2d561e017a4ce6b Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 6 Mar 2011 12:51:17 +0000 Subject: [PATCH] * sample/list.rb (MyElem#initialize): initialize @head explicitely. Otherwise -W2 option makes following warning. "warning: instance variable @head not initialized". This issue was founded by Andrew Grimm. Thanks Andrew! [ruby-core:35435][Bug#4471] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ sample/list.rb | 1 + 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 188122176b..4fad30bd82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sun Mar 6 21:49:04 2011 KOSAKI Motohiro + + * sample/list.rb (MyElem#initialize): initialize @head + explicitely. Otherwise -W2 option makes following warning. + "warning: instance variable @head not initialized". + This issue was founded by Andrew Grimm. Thanks Andrew! + [ruby-core:35435][Bug#4471] + Sun Mar 6 05:21:41 2011 NARUSE, Yui * class.c: fix camelCase to snake_case in documentation code examples. diff --git a/sample/list.rb b/sample/list.rb index 221f7edb16..85899ce7ff 100644 --- a/sample/list.rb +++ b/sample/list.rb @@ -5,6 +5,7 @@ class MyElem # @variables are instance variable, no declaration needed @data = item @succ = nil + @head = nil end def data