4 ms·
Polyfill libraries can provide methods that were added in newer versions of the language (e.g. to std lib classes), but they can't provide the new syntax that h
by caseyohara 3y ago
Polyfill libraries can provide methods that were added in newer versions of the language (e.g. to std lib classes), but they can't provide the new syntax that has been added.
Ruby has had a lot of syntax changes over the years that are incompatible with an older interpreter. An easy example is the 1.9 shorthand hash syntax for symbol keys `{ name: "pants" }` instead of the hashrocket syntax `{ :name => "pants" }`. More recent examples would be keyword args or pattern matching.