Skip to content
Browse files

Remove some unused code that didn't work on rubinius (issue #11).

  • Loading branch information...
1 parent 662f4ec commit cb0de79d6f7e06ab18cca58e80aa4ffd130d5fb2 @aquasync committed Jul 18, 2012
Showing with 0 additions and 17 deletions.
  1. +0 −8 lib/ole/support.rb
  2. +0 −9 test/test_support.rb
View
8 lib/ole/support.rb
@@ -11,14 +11,6 @@
require 'enumerator'
class String # :nodoc:
- # plural of String#index. returns all offsets of +string+. rename to indices?
- #
- # note that it doesn't check for overlapping values.
- def indexes string
- # in some ways i'm surprised that $~ works properly in this case...
- to_enum(:scan, /#{Regexp.quote string}/m).map { $~.begin 0 }
- end
-
def each_chunk size
(length / size.to_f).ceil.times { |i| yield self[i * size, size] }
end
View
9 test/test_support.rb
@@ -36,15 +36,6 @@ def test_io
assert_equal str, dst.string
end
- def test_string
- str = "aa aa ||| aa aa"
- assert_equal [0, 3, 10, 13], str.indexes('aa')
- # this is mostly a check that regexp quote is used.
- assert_equal [6, 7, 8], str.indexes('|')
- # note not [6, 7] - no overlaps
- assert_equal [6], str.indexes('||')
- end
-
def test_symbol
array = (1..10).to_a
assert_equal 55, array.inject(&:+)

0 comments on commit cb0de79

Please sign in to comment.
Something went wrong with that request. Please try again.