Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
require 'sinatra' index = ->(page=0) do "#{page}\n" end get '/p/:page', &index get '/', &index p index.call() p index.call(5)
さて、起動時にこれは "0\n" と "5\n" を出力しますが、/p/5 にアクセスすると "0" がレンダリングされます。何故ですか?そして、どうすればそれを正しくすることができますか?