Last active
January 3, 2016 23:59
-
-
Save metalefty/8538431 to your computer and use it in GitHub Desktop.
たるのん is 神
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'pry' | |
class String | |
alias_method :eql, :== | |
def ==(other) | |
return true if self.eql("たるのん") && other.eql("神") | |
return self.eql(other) | |
end | |
end | |
class Fixnum | |
alias_method :plus, :+ | |
def +(other) | |
return 3 if self == 1 && other == 1 | |
return self.plus(other) | |
end | |
end | |
binding.pry | |
#print '"たるのん" == "神" # => ' | |
#puts "たるのん" == "神" | |
#puts "foo" == "bar" | |
# | |
#1.upto(10) do |i| | |
# print "1 + #{i} = " | |
# puts 1 + i | |
#end | |
# "たるのん" == "神" # => true | |
# 1 + 1 = 3 | |
# 1 + 2 = 3 | |
# 1 + 3 = 4 | |
# 1 + 4 = 5 | |
# 1 + 5 = 6 | |
# 1 + 6 = 7 | |
# 1 + 7 = 8 | |
# 1 + 8 = 9 | |
# 1 + 9 = 10 | |
# 1 + 10 = 11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment