Fix #6105 by moving ``puts`` into the base class
parent
c399d7e381
commit
d7b8767afc
|
@ -74,6 +74,21 @@ class Output < Rex::Ui::Output
|
|||
def reset
|
||||
end
|
||||
|
||||
def puts(*args)
|
||||
args.each do |argument|
|
||||
line = argument.to_s
|
||||
print_raw(line)
|
||||
|
||||
unless line.ends_with? "\n"
|
||||
# yes, this is output, but `IO#puts` uses `rb_default_rs`, which is
|
||||
# [`$/`](https://github.com/ruby/ruby/blob/3af8e150aded9d162bfd41426aaaae0279e5a653/io.c#L12168-L12172),
|
||||
# which is [`$INPUT_RECORD_SEPARATOR`](https://github.com/ruby/ruby/blob/3af8e150aded9d162bfd41426aaaae0279e5a653/lib/English.rb#L83)
|
||||
print_raw($INPUT_RECORD_SEPARATOR)
|
||||
end
|
||||
end
|
||||
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue