Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix example codes

  • Loading branch information...
commit 6539cb4d0801341587c2958c78c319b0ca2f0611 1 parent de13b71
@kachick authored
Showing with 5 additions and 5 deletions.
  1. +1 −1  example/example.rb
  2. +4 −4 lib/flyweight.rb
View
2  example/example.rb
@@ -14,7 +14,7 @@ def initialize(looks, price)
a = Material.intern :metal, 2000
b = Material.intern :metal, 2000
-c = Material.new :metal, 2000
+c = Material.new :metal, 2000
d = Material.intern :paper, 50
p a == b #=> true
p a.equal? b #=> true
View
8 lib/flyweight.rb
@@ -12,10 +12,10 @@
# end
# end
#
-# a = Material.value :metal, 2000
-# b = Material.value :metal, 2000
-# c = Material.new :metal, 2000
-# d = Material.value :paper, 50
+# a = Material.intern :metal, 2000
+# b = Material.intern :metal, 2000
+# c = Material.new :metal, 2000
+# d = Material.intern :paper, 50
# a == b #=> true
# a.equal? b #=> true
# a == c #=> true
Please sign in to comment.
Something went wrong with that request. Please try again.