Skip to content
Open
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
4 changes: 2 additions & 2 deletions lib/nexpose/rexlite/mime/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def to_s
end

def find(idx)
if (idx.class == ::Fixnum)
if idx.kind_of?(Integer)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer Object#is_a? over Object#kind_of?.

return self.headers[idx]
else
self.headers.each do |pair|
Expand All @@ -59,7 +59,7 @@ def add(var, val)
end

def remove(idx)
if (idx.class == ::Fixnum)
if idx.kind_of?(Integer)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer Object#is_a? over Object#kind_of?.

self.headers.delete_at(idx)
else
self.headers.each_index do |i|
Expand Down