Skip to content

Instantly share code, notes, and snippets.

@osheroff
Created June 27, 2012 17:21
Show Gist options
  • Save osheroff/3005515 to your computer and use it in GitHub Desktop.
Save osheroff/3005515 to your computer and use it in GitHub Desktop.
1.9 incompatibilities patch
class ActiveSupport::TestCase
def self.mark_19_incompat
@marked_19_incompat = true
end
def self.ruby_19_compatible?
!@marked_19_incompat
end
def run_with_19(*args, &block)
return true if ENV['RUBY_19_MODE'] && !self.class.ruby_19_compatible?
run_without_19(*args, &block)
end
alias_method_chain(:run, "19")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment