Fix #6105 by moving ``puts`` into the base class

bug/bundler_fix
HD Moore 2015-10-19 10:42:46 -05:00
parent c399d7e381
commit d7b8767afc
1 changed files with 15 additions and 0 deletions

View File

@ -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