Skip to content

Instantly share code, notes, and snippets.

def self.first_uninteresting
numbers = all(:order=>:number, :conditions=>"number >= 0").map(&:number)
highest = numbers.sort.last
missing = (1..highest).to_a - numbers
return highest + 1 if missing.empty?
missing.first
end
Source
_global_ = 1
class Blah
def foo(a, b)
c = a._op_plus(b)
_global_.print(c)
end
end