File: support.rb

package info (click to toggle)
ruby-contracts 0.17-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 624 kB
  • sloc: ruby: 3,805; makefile: 4; sh: 2
file content (10 lines) | stat: -rw-r--r-- 210 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
def with_enabled_no_contracts
  no_contracts = ENV["NO_CONTRACTS"]
  ENV["NO_CONTRACTS"] = "true"
  yield
  ENV["NO_CONTRACTS"] = no_contracts
end

def ruby_version
  RUBY_VERSION.match(/\d+\.\d+/)[0].to_f
end