3 ms·
This: cat > foo.rb <<'EOF' module Foo File.open('oops', 'wb') { |f| f << "hello\n" } end EOF srb rbi init ls -1 oops # => oops It's not
by lloeki 3y ago
This:
cat > foo.rb <<'EOF'
module Foo
File.open('oops', 'wb') { |f| f << "hello\n" }
end
EOF
srb rbi init
ls -1 oops # => oops
It's not even about malicious code, it's about blanket eval'ing a whole tree of rb files, which may contain anything from mistakes to legit but side-effectful code.
Neither of those have such side effects:
rbs prototype rb foo.rb
rbs prototype rbi foo.rb
typeprof foo.rb