ronin-rb / ronin-support

A support library for Ronin. Like activesupport, but for hacking!
https://ronin-rb.dev
GNU Lesser General Public License v3.0
25 stars 9 forks source link

Add a `String#to_io` method #308

Closed postmodern closed 2 years ago

postmodern commented 2 years ago

Add a String#to_io which simple creates a StringIO object from the String.

postmodern commented 2 years ago

This apparently breaks a lot of internal stuff.

/data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/result.rb:34:in `file?': can't convert String to IO (String#to_io gives StringIO) (TypeError)
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/result.rb:34:in `block in initialize'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/result.rb:33:in `each'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/result.rb:33:in `map'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/result.rb:33:in `initialize'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov.rb:419:in `new'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov.rb:419:in `result_with_not_loaded_files'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov.rb:389:in `process_coverage_result'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov.rb:105:in `result'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/configuration.rb:197:in `block in at_exit'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov.rb:189:in `run_exit_tasks!'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov.rb:179:in `at_exit_behavior'
    from /data/home/postmodern/code/ronin-rb/vendor/bundle/ruby/3.1.0/gems/simplecov-0.21.2/lib/simplecov/defaults.rb:30:in `block in <top (required)>'