1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
kosaki 2011-03-06 12:51:17 +00:00
parent 18f4f08885
commit 97f07f0968
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,11 @@
Sun Mar 6 21:49:04 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* 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 <naruse@ruby-lang.org>
* class.c: fix camelCase to snake_case in documentation code examples.

View file

@ -5,6 +5,7 @@ class MyElem
# @variables are instance variable, no declaration needed
@data = item
@succ = nil
@head = nil
end
def data