def with_ruby_from_stdin(ruby, &_block)
      original_stdin = $stdin
      stdin = StringIO.new
      stdin.write(ruby)
      stdin.rewind
      $stdin = stdin
      yield
    ensure
      $stdin = original_stdin
    end
def with_ruby_from_stdin(ruby, &_block)
      original_stdin = $stdin
      stdin = StringIO.new
      stdin.write(ruby)
      stdin.rewind
      $stdin = stdin
      yield
    ensure
      $stdin = original_stdin
    end
Overrides the global stdin to allow RuboCop to read Ruby code from it.

 @param ruby [String] the Ruby code to write to the overridden stdin
 @param _block [Block] the block to perform with the overridden stdin
 @return [void]