Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangHanDong committed Mar 19, 2011
1 parent 2dfadee commit 9c3acd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/ruby_extendsions/array_extendsions.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ def binary_search_index(e, l = 0, u = length - 1)


# 基于二分查找的include? # 基于二分查找的include?
def b_include? e def b_include? e
temp = self.sort begin
!temp.binary_search_index(e).nil? temp = self.sort
!temp.binary_search_index(e).nil?
rescue
return false
end
end end


#比较两个数组内容相同,不包含顺序 #比较两个数组内容相同,不包含顺序
Expand Down
2 changes: 1 addition & 1 deletion ruby_extendsions.gemspec
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "ruby_extendsions" s.name = "ruby_extendsions"
s.version = "0.1.8.2" s.version = "0.1.8.3"
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.authors = ["blackanger"] s.authors = ["blackanger"]
s.email = ["blackanger.z@gmail.com"] s.email = ["blackanger.z@gmail.com"]
Expand Down

0 comments on commit 9c3acd7

Please sign in to comment.