help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: [bug] Class variables only bound in methods followi


From: Damien Pollet
Subject: [Help-smalltalk] Re: [bug] Class variables only bound in methods following them
Date: Sun, 26 Apr 2009 08:23:45 -0700

Issue status update for http://smalltalk.gnu.org/project/issue/286 Post a follow up: http://smalltalk.gnu.org/project/comments/add/286

Project:      GNU Smalltalk
Version:      <none>
Component:    VM
Category:     bug reports
Priority:     normal
Assigned to:  Unassigned
Reported by:  dpollet
Updated by:   dpollet
-Status:       invalid
+Status:       active

Actually, ruby behaves like I want:
  def hello
    puts HELLO
  end
  # calling hello would fail here
  HELLO = "Hello, world!"
  hello()

the variable is bound like it should even if the reference is before
the declaration (well actually it's declared when it's first seen in
the method), but of course if you evaluate it before it's been
initialized, then you get an exception.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]