4qjwN0tVxkX68f2leDnvlo changeset

Changeset633539353234 (b)
ParentNone (a)
ab
0+class ExampleClass
0+  @variable = "foo"
0+  @@variable = "bar"
0+ 
0+  def initialize
0+    @variable = "baz"
0+  end
0+ 
0+  def self.test
0+    puts @variable
0+  end
0+ 
0+  def test
0+    self.class.test
0+    puts @@variable
0+    puts @variable
0+  end
0+end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- Revision None
+++ Revision 633539353234
@@ -0,0 +1,18 @@
+class ExampleClass
+ @variable = "foo"
+ @@variable = "bar"
+
+ def initialize
+ @variable = "baz"
+ end
+
+ def self.test
+ puts @variable
+ end
+
+ def test
+ self.class.test
+ puts @@variable
+ puts @variable
+ end
+end