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-3.3.0.beta.2 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.3.0.beta.1 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.3 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.2 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.2.beta lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.1 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.9 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.8 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.7 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.6 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.5 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.4 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.2 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.2.0.beta.1 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.1.1 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.1.1.beta lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.1.0 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.1.0.beta.5 lib/extensions/mspec/mspec/guards/bug.rb
rhodes-3.1.0.beta.4 lib/extensions/mspec/mspec/guards/bug.rb