Class: BugGuard

Inherits:
VersionGuard show all
Defined in:
lib/extensions/mspec/mspec/guards/bug.rb

Instance Attribute Summary

Attributes inherited from SpecGuard

#name, #parameters

Instance Method Summary collapse

Methods inherited from VersionGuard

#ruby_version

Methods inherited from SpecGuard

#===, #add, clear, clear_guards, finish, guards, #implementation?, #os?, #platform?, #record, report, #report_key, #reporting?, ruby_version, ruby_version_override, ruby_version_override=, #standard?, #unregister, #windows?, #wordsize?, #yield?

Constructor Details

#initialize(bug, version) ⇒ BugGuard

Returns a new instance of BugGuard.



4
5
6
7
8
# File 'lib/extensions/mspec/mspec/guards/bug.rb', line 4

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

Instance Method Details

#match?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/extensions/mspec/mspec/guards/bug.rb', line 10

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