[ create a new paste ] login | about

Link: http://codepad.org/gph0vD8N    [ raw code | output | fork ]

Ruby, pasted on Sep 12:
def first
	puts "first"
	false
end

def second
	puts "second"
	true
end

def third
	puts "third"
	true
end

case
	when first
		puts "1"
	when second
		puts "2"
	when third
		puts "3"
	else
		puts "oops"
end


Output:
1
2
3
first
second
2


Create a new paste based on this one


Comments: