backports 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 6
4
- :patch: 2
4
+ :patch: 3
5
5
  :build:
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "backports"
8
- s.version = "2.6.2"
8
+ s.version = "2.6.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marc-Andr\u{e9} Lafortune"]
12
- s.date = "2012-07-20"
12
+ s.date = "2012-08-13"
13
13
  s.description = " Essential backports that enable some of the really nice features of ruby 1.8.7, ruby 1.9 and rails from ruby 1.8.6 and earlier.\n"
14
14
  s.email = "github@marc-andre.ca"
15
15
  s.extra_rdoc_files = [
@@ -18,10 +18,8 @@ module ExceptionForMatrix # :nodoc:
18
18
  def_e2message(TypeError, "wrong argument type %s (expected %s)")
19
19
  def_e2message(ArgumentError, "Wrong # of arguments(%d for %d)")
20
20
 
21
- def_exception("ErrDimensionMismatch", "\#{self.name} dimension mismatch")
22
- def_exception("ErrNotRegular", "Not Regular Matrix")
23
- def_exception("ErrOperationNotDefined", "Operation(%s) can\\'t be defined: %s op %s")
24
- def_exception("ErrOperationNotImplemented", "Sorry, Operation(%s) not implemented: %s op %s")
21
+ def_exception("ErrOperationNotDefined", "Operation(%s) can\\'t be defined: %s op %s") unless const_defined?(:ErrOperationNotDefined, false)
22
+ def_exception("ErrOperationNotImplemented", "Sorry, Operation(%s) not implemented: %s op %s") unless const_defined?(:ErrOperationNotImplemented, false)
25
23
  end
26
24
 
27
25
  #
@@ -513,7 +511,7 @@ class Matrix
513
511
  self
514
512
  end
515
513
 
516
- SELECTORS = {:all => true, :diagonal => true, :off_diagonal => true, :lower => true, :strict_lower => true, :strict_upper => true, :upper => true}.freeze
514
+ SELECTORS = {:all => true, :diagonal => true, :off_diagonal => true, :lower => true, :strict_lower => true, :strict_upper => true, :upper => true}.freeze unless const_defined?(:SELECTORS)
517
515
  #
518
516
  # :call-seq:
519
517
  # index(value, selector = :all) -> [row, column]
@@ -610,12 +608,12 @@ class Matrix
610
608
  column_size == 0 || row_size == 0
611
609
  end
612
610
 
613
-
611
+
614
612
  #
615
613
  # Returns +true+ is this is an hermitian matrix.
616
614
  # Raises an error if matrix is not square.
617
615
  #
618
-
616
+
619
617
  def hermitian?
620
618
  Matrix.Raise ErrDimensionMismatch unless square?
621
619
  each_with_index(:strict_upper).all? do |e, row, col|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-20 00:00:00.000000000 Z
12
+ date: 2012-08-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' Essential backports that enable some of the really nice features
15
15
  of ruby 1.8.7, ruby 1.9 and rails from ruby 1.8.6 and earlier.