Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/net/ldap/filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def to_ber
when :eq
if @right == "*" # presence test
@left.to_s.to_ber_contextspecific(7)
elsif @right =~ /[*]/ # substring
elsif @right.to_s =~ /[*]/ # substring
# Parsing substrings is a little tricky. We use String#split to
# break a string into substrings delimited by the * (star)
# character. But we also need to know whether there is a star at the
Expand Down
2 changes: 1 addition & 1 deletion test/test_ldap_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_connection_refused

def test_connection_timeout
connection = Net::LDAP::Connection.new(:host => "fail.Errno::ETIMEDOUT", :port => 636, :socket_class => FakeTCPSocket)
stderr = capture_stderr do
capture_stderr do
assert_raise Net::LDAP::Error do
connection.socket
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_snmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def self.raw_string(s)
def test_invalid_packet
data = "xxxx"
assert_raise(Net::BER::BerError) do
ary = data.read_ber(Net::SNMP::AsnSyntax)
data.read_ber(Net::SNMP::AsnSyntax)
end
end

Expand Down
6 changes: 2 additions & 4 deletions test/test_ssl_ber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ def setup
end

def test_transmit_strings
omit "JRuby throws an error without a real socket"
omit_if RUBY_PLATFORM == "java"
omit_if RUBY_PLATFORM == "java", "JRuby throws an error without a real socket"

assert_equal "foo", transmit("foo")
end

def test_transmit_ber_encoded_numbers
omit "JRuby throws an error without a real socket"
omit_if RUBY_PLATFORM == "java"
omit_if RUBY_PLATFORM == "java", "JRuby throws an error without a real socket"

@to.write 1234.to_ber
assert_equal 1234, @from.read_ber
Expand Down