summaryrefslogtreecommitdiff
path: root/sample/list.rb
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-06 12:51:17 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-06 12:51:17 +0000
commit97f07f096843beec98c13063a2d561e017a4ce6b (patch)
tree17e5c29cca8c23055141991f23a9bd3c5288e7f9 /sample/list.rb
parent18f4f0888513be990c164ecd5b3ea92e24570240 (diff)
* 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
Diffstat (limited to 'sample/list.rb')
-rw-r--r--sample/list.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/sample/list.rb b/sample/list.rb
index 221f7ed..85899ce 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