Sha256: 471342398084cf5d6ec76fb4c1204be2c6a4fdea58a057494f93fba45b7b3152

Contents?: true

Size: 472 Bytes

Versions: 175

Compression:

Stored size: 472 Bytes

Contents

require 'mspec/guards/version'

class BugGuard < VersionGuard
  def initialize(bug, version)
    @bug = bug
    @version = SpecVersion.new version, true
    self.parameters = [@bug, @version]
  end

  def match?
    return false if MSpec.mode? :no_ruby_bug
    standard? && ruby_version <= @version
  end
end

class Object
  def ruby_bug(bug, version)
    g = BugGuard.new bug, version
    g.name = :ruby_bug
    yield if g.yield? true
  ensure
    g.unregister
  end
end

Version data entries

175 entries across 151 versions & 4 rubygems

Version Path
rhodes-5.5.18 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.17 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.15 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.0.22 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.2 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.0.7 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.0.3 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-5.5.0 lib/extensions/mspec/mspec/guards/bug.rb
tauplatform-1.0.3 lib/extensions/mspec/mspec/guards/bug.rb
mspec-1.9.1 lib/mspec/guards/bug.rb
mspec-1.9.0 lib/mspec/guards/bug.rb
tauplatform-1.0.2 lib/extensions/mspec/mspec/guards/bug.rb
tauplatform-1.0.1 lib/extensions/mspec/mspec/guards/bug.rb
mspec-1.8.0 lib/mspec/guards/bug.rb
mspec-1.7.0 lib/mspec/guards/bug.rb
mspec-1.6.0 lib/mspec/guards/bug.rb
mspec-1.5.21 lib/mspec/guards/bug.rb
mspec-1.5.20 lib/mspec/guards/bug.rb
mspec-1.5.19 lib/mspec/guards/bug.rb
mspec-1.5.18 lib/mspec/guards/bug.rb