in_array 0.1.5 → 0.1.6

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: 319f3faf520405e8675f0e6779be8b8895494ab1
4
- data.tar.gz: 4942d3c77f61a11c162d00c97fd534ea5249678c
3
+ metadata.gz: 1a3a23c19e1912a8336561b9b2aff66455237480
4
+ data.tar.gz: ebf2da7fc14ebc115ced205aee335a57d0acc42f
5
5
  SHA512:
6
- metadata.gz: f8634d5780c3b61bdc45f7cb0c9a951fe6fda3d3d27a489a33f5ba8303e228aa5a92845900d8c795f6fb7cf080cd028ffc99ae7a4797069ddb28443d9de00a4c
7
- data.tar.gz: e889618b96c516cff842b1220463496dfee30681ad9459bfb118f699b94100a312224f0f1a59b4840bac7e3a11b0236c656f07ff0617d936268adfba79722d23
6
+ metadata.gz: 5f4e573e8e5f2cd60b44dbf0a17f743e2df3ac39b287aab083660d0d4e26c4b646a606a948fa2785eff5b3209dffafd0bb66d0a47f5126a98c7de1465548796b
7
+ data.tar.gz: 97607337e8ca29c07538fe3db442309a3b2251c61278aa685f8a74adb4a0ff857196e7f36a26dda51eae0b959266bd06a0010abd632f9c62b190bf84a0c9ccaf
data/irbt.rb CHANGED
@@ -2,8 +2,6 @@
2
2
  # An IRB + in_array bed
3
3
 
4
4
  require 'irb'
5
- $force_alias_read_line_module = true
6
- require 'mini_readline'
7
5
 
8
6
  puts "Starting an IRB console with in_array loaded."
9
7
 
@@ -3,5 +3,5 @@
3
3
  #* version.rb - The version string for flex array.
4
4
  module InArray
5
5
  #The version string for flex array.
6
- VERSION = "0.1.5"
6
+ VERSION = "0.1.6"
7
7
  end
@@ -3,6 +3,15 @@ gem 'minitest'
3
3
  require 'minitest/autorun'
4
4
  require 'minitest_visible'
5
5
 
6
+ class MyArray
7
+ include InArrayAlready
8
+ #Balance of class omitted.
9
+ end
10
+
11
+ class NotAnArray
12
+ #Balance of class omitted.
13
+ end
14
+
6
15
  class InArrayTester < Minitest::Test
7
16
  #Track mini-test progress.
8
17
  include MinitestVisible
@@ -23,4 +32,12 @@ class InArrayTester < Minitest::Test
23
32
  def test_that_it_leaves_arrays_alone
24
33
  assert_equal([1,2,3].in_array, [1,2,3])
25
34
  end
35
+
36
+ def test_with_custom_classes
37
+ foo = MyArray.new
38
+ assert_equal(foo, foo.in_array)
39
+
40
+ bar = NotAnArray.new
41
+ assert_equal([bar], bar.in_array)
42
+ end
26
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: in_array
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-05 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest_visible