看板 Ruby 關於我們 聯絡資訊
actionpack-1.13.6/lib/action_controller/routing.rb 465 # Write the real recognition implementation and then resend the message. 466 def recognize(path, environment={}) 467 write_recognition 468 recognize path, environment 469 end 實驗: $ cat ~/a.rb o = Object.new def o.foo puts "1" instance_eval("def foo; puts 'hi'; end") puts "2" foo puts "3" end o.foo puts "===========" o.foo $ ruby a.rb 1 2 hi 3 =========== hi -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.167.155.183
LyinZ:真噁心 @_@ 12/09 22:32
godfat:這大概可以說是自我更新吧 @_@b 12/09 22:34