WARNING: Use Ruby 2.7.1 or master
git clone https://github.com/mame/ruby-type-profiler.git
cd ruby-type-profiler
git submodule init
git submodule update
cd rbs && bundle install && bundle exec rake parser && cd ..
bundle install
bundle exec ruby exe/type-profiler target.rb
# test.rb
def foo(x)
if x > 10
x.to_s
else
nil
end
end
foo(42)
$ bundle exec ruby exe/type-profiler test.rb
# Classes
class Object
def foo : (Integer) -> String?
end
Contribution is welcome!
- Reorganize the test suite (by using minitest framework or something)
- Design and implement an reasonable CLI UI (nothing is configurable currently)
- Release a gem
- Continue to perform an experiment