HBASE-18393 Fix shell noninteractive launch
Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
parent
3574757f74
commit
775179bc4a
|
@ -215,6 +215,15 @@ else
|
|||
require "irb/workspace"
|
||||
workspace = IRB::WorkSpace.new(binding())
|
||||
scanner = RubyLex.new
|
||||
|
||||
# RubyLex claims to take an IO but really wants an InputMethod
|
||||
module IOExtensions
|
||||
def encoding
|
||||
external_encoding
|
||||
end
|
||||
end
|
||||
IO.include IOExtensions
|
||||
|
||||
scanner.set_input(STDIN)
|
||||
scanner.each_top_level_statement do |statement, linenum|
|
||||
puts(workspace.evaluate(nil, statement, 'stdin', linenum))
|
||||
|
|
Loading…
Reference in New Issue