Skip to content
Browse files

polish examples

  • Loading branch information...
1 parent b107220 commit 76d81e53af1454de3aceb75d1300cfe97d4ab981 @JoshCheek committed
Showing with 2 additions and 7 deletions.
  1. +0 −5 session2/examples/1_output.rb
  2. +1 −1 session2/examples/3_array.rb
  3. +1 −1 session2/examples/4_classes.rb
View
5 session2/examples/1_output.rb
@@ -10,8 +10,3 @@
print "on the same line"
puts # an empty newline
-
-# field types can be seen at http://ruby-doc.org/core/classes/Kernel.html#M005962
-printf "%d is %b in binary, %x in hex, and %o in octal\n" , 95 , 95 , 95 , 95
-printf "%10s\n" , 'hello'
-printf "%10s\n" , 'world'
View
2 session2/examples/3_array.rb
@@ -5,7 +5,7 @@
paths_ary = [ '/bin' , '/opt/local/var' , '/Users/josh' ]
-# if we were on Michael's or Kris' computer, we might have this in our path
+# if we were on Michael's or Kris' computer, we might have this in our path (they use Windows)
paths_ary << 'c:\\michael'
paths_ary << 'c:\\kris'
View
2 session2/examples/4_classes.rb
@@ -7,7 +7,7 @@
# so I'm not going to rewrite it, this is just a translation from Java to Ruby
class Bill
- RATE = 150.00 # dollars per quarter hour
+ RATE = 150.00 # dollars per quarter hour (note that it's bad practice to use floats for money)
attr_accessor :hours , :minutes , :fee

0 comments on commit 76d81e5

Please sign in to comment.
Something went wrong with that request. Please try again.