Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix a bug

  • Loading branch information...
commit 9c3acd7a2142006e4736cf320410417146287d5a 1 parent 2dfadee
@ZhangHanDong authored
View
8 lib/ruby_extendsions/array_extendsions.rb
@@ -59,8 +59,12 @@ def binary_search_index(e, l = 0, u = length - 1)
# 基于二分查找的include?
def b_include? e
- temp = self.sort
- !temp.binary_search_index(e).nil?
+ begin
+ temp = self.sort
+ !temp.binary_search_index(e).nil?
+ rescue
+ return false
+ end
end
#比较两个数组内容相同,不包含顺序
View
2  ruby_extendsions.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = "ruby_extendsions"
- s.version = "0.1.8.2"
+ s.version = "0.1.8.3"
s.platform = Gem::Platform::RUBY
s.authors = ["blackanger"]
s.email = ["blackanger.z@gmail.com"]
Please sign in to comment.
Something went wrong with that request. Please try again.