How to begin static typing in Ruby 3?

Does anyone know how to begin using static typing in Ruby 3? I looked here and tried changing the following block in some code, but I’m getting SyntaxError.

Original:

def pretty(seperator)
  ...
end

New:

def pretty: (seperator: String) -> String
  ...
end

Did you look at this site?

1 Like

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs