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”。这是为什么?我怎样才能使它正确?