Last active
December 15, 2015 15:09
-
-
Save nb/c426bc61995d5bd5f260 to your computer and use it in GitHub Desktop.
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
def twice(name, &blk) | |
yield 1, 2 | |
yield [1, 2] | |
blk.call(1, 2) | |
end | |
a, b = 1, 2 | |
10.times do | |
puts 'toshko' | |
end | |
class Fixnum | |
def ordinalize | |
self.to_s + 'th' | |
end | |
end | |
class Toshko | |
has_many :order_items | |
belongs_to :client | |
def foo | |
end | |
10.times { |current| self.define_method "m#{current}") {} } | |
def self.foo | |
end | |
end | |
def Toshko.foo | |
end | |
t1 = Toshko.new | |
t2 = Toshko.new | |
twice 'foo' do |a| | |
end | |
lambda do | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment