Skip to content

Commit

Permalink
finished chapter 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mblair committed Apr 15, 2011
1 parent eea7f15 commit 2c3364b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ch03/variables/09.rb
@@ -0,0 +1,4 @@
person = "Tim"
puts "The object in 'person' is a #{person.class}"
puts "The obbject has an id of #{person.object_id}"
puts "and a value of #{person}"
5 changes: 5 additions & 0 deletions ch03/variables/10.rb
@@ -0,0 +1,5 @@
person1 = "Tim"
person2 = person1
person1[0] = "J"
puts "person1 is #{person1}"
puts "person2 is #{person2}"
5 changes: 5 additions & 0 deletions ch03/variables/11.rb
@@ -0,0 +1,5 @@
person1 = "Tim"
person2 = person1.dup
person1[0] = "J"
puts "person1 is #{person1}"
puts "person2 is #{person2}"
4 changes: 4 additions & 0 deletions ch03/variables/12.rb
@@ -0,0 +1,4 @@
person1 = "Tim"
person2 = person1
person1.freeze
person1[0] = "J"

0 comments on commit 2c3364b

Please sign in to comment.