Hacker News new | ask | show | jobs
by johnlinvc 2464 days ago
Not exactly the same, since there's no UInt8 in Ruby.

    require 'sinatra'
    get %r{/hello/([^/]+)/(\d+)} do |name, age|
      "Hello, #{age} year old named #{name}!"
    end
1 comments

I am guessing age would be a string though?
yes, the regex part handles the validation.