Ruby 无法将shell输出传递给IRB

Ruby 无法将shell输出传递给IRB,ruby,macos,shell,irb,Ruby,Macos,Shell,Irb,我需要将输出从shell传递到IRB控制台并等待输入。但IRB返回零而不是等待 > echo "gets" | irb WARNING: This version of ruby is included in macOS for compatibility with legacy software. In future versions of macOS the ruby runtime will not be available by default, and may require

我需要将输出从shell传递到IRB控制台并等待输入。但IRB返回零而不是等待

> echo "gets" | irb

WARNING: This version of ruby is included in macOS for compatibility with legacy software.
In future versions of macOS the ruby runtime will not be available by
default, and may require you to install an additional package.

Switch to inspect mode.
gets
nil

如何从IRB外部传递命令,使其等待输入?

如何
ruby-e“get”
然后您可以启动
IRB
您想要实现什么?如何
ruby-e“get”
然后您可以启动
IRB
您想要实现什么?