signed_multiset 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f89a246862b71b53eeb8ee2f38eadfab7a4b90cf
4
- data.tar.gz: 30777e6a599eb97385961f21593de03ecd8b0347
3
+ metadata.gz: fe13f4864a194a40086fa0e4664bdb5eac7240b2
4
+ data.tar.gz: 4979034474a5bea562d031e381af7f91951e7cf1
5
5
  SHA512:
6
- metadata.gz: 000bb39cfbed2233c77e35c9d4062a052648fbc1764fba9a892dc4f3c2327ee36dbafae8650be4f934f3ebc60b32ffd8c0cbf2dff432789aaaeb8e8bff458f81
7
- data.tar.gz: c9dbf1ca92a7c8dc9905eb119180c7636a61a72e6499176ca95cf7c420bf5d99c3e19130345b341ddaa3f00096ece528699eea76c91fdd267f27a64f771d79ef
6
+ metadata.gz: 40240d2831373f64a42e72a8db05a4898fd15e5280802e80fd19f0ad15d870e60ae87165365ac42e91b6483a4ea4520a4762d349db4f5ae1fdd7baa210c26760
7
+ data.tar.gz: 737f83b86065beeba47cc296e278477ed8fd5ef68c52e7b03af9042446e189fb8655cd6e537301b28ea23c8beaa1e688e66907c9e132d632d5994fe3716992b3
@@ -1,5 +1,20 @@
1
1
  language: ruby
2
+ cache: bundler
3
+ bundler_args: --without yard pry
2
4
  rvm:
3
- - 1.9.2
4
5
  - 1.9.3
5
- - 2.0.0
6
+ - 2.0.0
7
+ - 2.1.0
8
+ - ruby-head
9
+ - rbx
10
+ - rbx-2
11
+ matrix:
12
+ include:
13
+ - rvm: jruby-19mode
14
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
15
+ - rvm: jruby-head
16
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
17
+ allow_failure:
18
+ - rvm: ruby-head
19
+ - rvm: jruby-head
20
+ fast_finish: true
@@ -1,13 +1,16 @@
1
1
  class SignedMultiset
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
 
4
4
  include Enumerable
5
5
  include Comparable
6
6
 
7
+ attr_reader :entries
8
+
7
9
  # Create a new SignedMultiset instance.
8
10
  #
9
11
  # @param object [Enumerable, nil] An array of keys, or key-muliplicity pairs.
10
12
  def initialize(*args)
13
+ @entries = {}
11
14
  obj = args.count == 1 ? args.first : args
12
15
  if obj.respond_to?(:each)
13
16
  obj.each { |k, v| increment(k, v || 1) }
@@ -191,14 +194,6 @@ class SignedMultiset
191
194
  "<#{self.class} #{to_s}>"
192
195
  end
193
196
 
194
- private
195
-
196
- # Get the key-multiplicity pairs (even those with zero multiplicities).
197
- #
198
- # @return [Hash]
199
- def entries
200
- @entries ||= {}
201
- end
202
197
  end
203
198
 
204
199
  def SignedMultiset(input)
@@ -1,6 +1,6 @@
1
1
  require 'signed_multiset'
2
- require 'minitest/spec'
3
2
  require 'minitest/autorun'
3
+ require 'minitest/spec'
4
4
  require 'minitest/pride'
5
5
 
6
6
  describe SignedMultiset do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signed_multiset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lewis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-24 00:00:00.000000000 Z
11
+ date: 2014-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler