Skip to content

Commit

Permalink
Merge pull request ManageIQ#18476 from jrafanie/io_write_accepts_mult…
Browse files Browse the repository at this point in the history
…iple_args_in_2_5

StringIO#write accepts multiple args in ruby 2.5
  • Loading branch information
bdunne authored Feb 21, 2019
2 parents 4306d94 + 16469d6 commit 44f6eac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/vmdb/loggers/io_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ def initialize(logger, level = :info, prefix = nil)
super()
end

def write(string)
@buffer ||= ""
@buffer << string
dump_buffer if string.include?("\n")
def write(*args)
args.each do |arg|
@buffer ||= ""
@buffer << arg
dump_buffer if arg.include?("\n")
end
end

def <<(string)
Expand Down

0 comments on commit 44f6eac

Please sign in to comment.