AM
Size: a a a
AM
AM
AK
АК
АК
AK
АК
АК
%x
), так что смысла в обычных я не вижуAK
AK
AK
macro dcl(*args)
{% aa = [] of (Path|Call) %}
{% for x in args %}
{% if x.is_a?(TypeDeclaration) %}
{% aa.push(x.var) %}
{% t = x.type %}
{% else %}
{% aa.push(x) %}
{% end %}
{% end %}
{% for v in aa %}
{{v.id}} : {{t.id}}
{% end %}
{% debug %}
end
dcl x, y, z : Float64
z = 0
puts z.class
AK
AK
AK
Ruby 3 came with a lot of notes emphasizing backward compatibility specifically. The team wanted to make groundbreaking improvements, but not at the cost of forcing developers to shift completely to the new version to use those benefits. The current version of RBS has been built with complete support for old versions of Ruby.
An important factor in enabling backward compatibility has been the decision to keep type declarations separate from the main code.
AK
DV
AK
DV
AP