Skip to content

Commit

Permalink
added explanatory comments
Browse files Browse the repository at this point in the history
  • Loading branch information
smholloway committed Feb 3, 2013
1 parent 00a2c7b commit 4d1720e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ruby/is_polymorphism_faster/main.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Testing the speed of polymorphism in Ruby. This program is based on the Wikipedia article
# http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming

# To run: ruby main.rb <number of runs to time (optional)>
# Example: ruby main.rb 5

class Animal
def initialize(name)
@name = name
Expand Down

0 comments on commit 4d1720e

Please sign in to comment.