Changeset 812

Show
Ignore:
Timestamp:
10/29/07 10:59:37 (6 years ago)
Author:
cho45
Message:

lang/ruby/Amalgam/plugins/debug_eval.rb,
lang/ruby/Amalgam/plugins/firefox.rb,
lang/ruby/Amalgam/AppController.rb:

どうも inspect でおちていたらしい。よくわからない

Location:
lang/ruby/Amalgam
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/Amalgam/AppController.rb

    r800 r812  
    127127 
    128128        def reload 
    129                 [plugins, default_plugins].each do |p| 
    130                         p.reload.first.each do |c| 
     129                reloaded = [] 
     130                [self.plugins, self.default_plugins].each do |pl| 
     131                        pl.reload.first.each do |c| 
     132                                log c 
     133                                reloaded << c 
    131134                                plugins[c].init(@controller) 
    132135                        end 
    133136                end 
     137                reloaded 
     138        end 
     139 
     140        def inspect 
     141                "#<%s:%#08x>" % [self.class.to_s, self.object_id] 
    134142        end 
    135143end 
     
    199207                        rescue Exception => e 
    200208                                log e 
     209                                $stderr.puts e.backtrace 
    201210                                alert("Error", e.inspect) 
    202211                        end 
     
    432441        end 
    433442 
    434         def reload 
    435                 @config.reload 
    436         end 
    437  
    438  
    439 end 
    440  
    441  
     443end 
     444 
     445 
  • lang/ruby/Amalgam/plugins/debug_eval.rb

    r796 r812  
    1818                        ] 
    1919                else 
    20                         # @config を評価すると SEGV するためコメントアウト 
    2120                        [ 
    2221                                "restart", 
    23                         #       "reload", 
    24                         #       "build_candidates", 
     22                                "@config.reload", 
     23                                "build_candidates", 
    2524                        ].map do |m| 
    2625                                Candidate.new(m, m, NSApp.applicationIconImage) do 
     
    3837                rescue Exception => e 
    3938                        result = e.inspect 
     39                        result << "\n#{e.backtrace.join("\n")}" 
    4040                end 
    4141                log result 
  • lang/ruby/Amalgam/plugins/firefox.rb

    r797 r812  
    3535                telnet.cmd("") { |c| result << c } 
    3636                eval(result.gsub(/repl> /, "")) 
    37         rescue 
     37        rescue Exception 
    3838                log "Failed to get history... retry..." 
    3939                sleep 10