Skip to content

Instantly share code, notes, and snippets.

@avanishgiri
Created August 3, 2013 03:29
Show Gist options
  • Save avanishgiri/6145045 to your computer and use it in GitHub Desktop.
Save avanishgiri/6145045 to your computer and use it in GitHub Desktop.
stuff
class Integer
def printMySquare
print self * self
print "\t"
return self
end
end
puts 4.printMySquare
@avanishgiri
Copy link
Author

puts 4.printMySquare

-- inside the code for printMySquare, we print (4 * 4) and a tab

-- then we return self, which is 4

-- so now its,

puts 4

-- now we print 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment