4qjwN0tVxkX68f2leDnvlo changeset

Changeset383835326235 (b)
Parent633539353234 (a)
ab
00class ExampleClass
...
1+  p self #=> ExampleClass
1+ 
...
11  @variable = "foo"
22  @@variable = "bar"
33 
44  def initialize
...
5+    p self #=> #<ExampleClass:…>
...
55    @variable = "baz"
66  end
77 
88  def self.test
...
9+    p self #=> ExampleClass
...
99    puts @variable
1010  end
1111 
1212  def test
...
13+    p self #=> #<ExampleClass:…>
...
1313    self.class.test
1414    puts @@variable
1515    puts @variable
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- Revision 633539353234
+++ Revision 383835326235
@@ -1,16 +1,21 @@
class ExampleClass
+ p self #=> ExampleClass
+
@variable = "foo"
@@variable = "bar"
def initialize
+ p self #=> #<ExampleClass:…>
@variable = "baz"
end
def self.test
+ p self #=> ExampleClass
puts @variable
end
def test
+ p self #=> #<ExampleClass:…>
self.class.test
puts @@variable
puts @variable