From: 三輪晋( M. S. ) <mi...@gm...> - 2009-10-06 10:16:36
|
みわです。 machu さんの profile.rb で warning が出力されるのですが warning を出力させないためにどうすればいいでしょうか? tDiary の profile.rb を DSL 風に書き直した & RSpec のテストを書いた - まちゅダイアリー(2009-09-09) http://www.machu.jp/diary/20090909.html#p01 http://coderepos.org/share/browser/platform/tdiary/plugin/profile.rb 【現象】 httpd のログに以下のような warning が出力される。 [Mon Oct 05 22:59:19 2009] [error] [client xxx.xxx.xxx.xxx] (plugin/profile.rb):130: warning: already initialized constant API_KEY [Mon Oct 05 22:59:21 2009] [error] [client xxx.xxx.xxx.xxx] (plugin/profile.rb):130: warning: already initialized constant API_KEY [Mon Oct 05 22:59:55 2009] [error] [client xxx.xxx.xxx.xxx] (plugin/profile.rb):130: warning: already initialized constant API_KEY [Mon Oct 05 22:59:58 2009] [error] [client xxx.xxx.xxx.xxx] (plugin/profile.rb):130: warning: already initialized constant API_KEY [Mon Oct 05 23:00:05 2009] [error] [client xxx.xxx.xxx.xxx] (plugin/profile.rb):130: warning: already initialized constant API_KEY [Mon Oct 05 23:00:08 2009] [error] [client xxx.xxx.xxx.xxx] (plugin/profile.rb):130: warning: already initialized constant API_KEY profile.rb の 130 行目はこの辺り 125 class Iddy < Base 126 ###################################################################### 127 # If you will modify or release another version of this code, 128 # please get your own application key from iddy.jp and replace below. 129 ###################################################################### 130 API_KEY = '9262ea8ffba962aabb4f1a1d3f1cfa953b11aa23' 131 132 property :name, '//response/users/user/accountname' 133 property :image, '//response/users/user/imageurl' 134 property :description, '/response/users/user/profile' 【質問】 API_KEY をどうにかすれば warning は無くなるでしょうか? 【環境】 NetBSD 4.0 tDiary version 2.3.3 Ruby version 1.8.7-p173 profile.rb は最新のもの 【設定】 日記のヘッダには <%= profile('miwarin', :friendfeed) %> と書いた。 -- みわ |