https://github.com/sorbet/sorbet/blob/master/gems/sorbet-run...
As you'll notice, `sig` doesn't actually do anything.
https://github.com/sorbet/sorbet/blob/master/gems/sorbet-run...
As you'll notice, `sig` doesn't actually do anything.
On the other hand, when you run your code, the sig blocks may or may not be used. There's a lot of machinery in https://github.com/sorbet/sorbet/blob/master/gems/sorbet-run... that handles understanding what a sig means and installing a wrapped version of a method that does type-checking on entry and exit. The intention is that the standalone sorbet executable should be used during development, but it can't catch every error, so the runtime system will double-check types at runtime, which is especially helpful when some parts of your code are typed and other parts are untyped, and control flow passes back and forth between those sections: the runtime will ensure that you don't accidentally pass an object with an unintended runtime type into code with static type expectations.