• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisionbad2d71cf011a4ef717253f6e2c88bcf73cff63f (tree)
Zeit2007-05-29 00:52:07
Autorikeji <ikeji@f836...>
Commiterikeji

Log Message

Support for old ruby
for example 1.8.2

git-svn-id: http://dev.ikejima.org/src/svn/pragger/trunk@363 f8368ae4-1e99-dc11-9799-0018f35ab5fa

Ändern Zusammenfassung

Diff

--- a/pragger.rb
+++ b/pragger.rb
@@ -11,7 +11,7 @@ class Plugin
1111 def initialize(file)
1212 instance_eval( @source = File.read(file).toutf8, file , 1)
1313 end
14- def self.load_plugins(folder = (Pathname(__FILE__).parent + "plugin"))
14+ def self.load_plugins(folder = (Pathname.new(__FILE__).parent + "plugin"))
1515 Pathname.glob(folder + "**/*.rb").sort.each do |file|
1616 begin
1717 $plugins[ file.relative_path_from(folder).to_s.gsub("/","::")[0..-4] ]= Plugin.new(file)
@@ -32,10 +32,10 @@ Plugin.load_plugins()
3232 configFile = "config.yaml"
3333 opt = OptionParser.new
3434 opt.on("-c", "--configfile CONFIGFILE") {|v| configFile = v }
35-opt.on("-p", "--plugindir PLUGINDIR") {|v| Plugin.load_plugins(Pathname(v)) }
35+opt.on("-p", "--plugindir PLUGINDIR") {|v| Plugin.load_plugins(Pathname.new(v)) }
3636 opt.on("-u", "--pluginusage PLUGINNAME") {|v| $plugins[v].source.gsub(/^## ?(.*)/){ puts $1 }; exit }
3737 opt.on("-l", "--listplugin") { $plugins.keys.sort.each{|k| puts k }; exit }
38-opt.on("-w", "--where") { puts(Pathname(__FILE__).parent + "plugin"); exit }
38+opt.on("-w", "--where") { puts(Pathname.new(__FILE__).parent + "plugin"); exit }
3939 opt.parse!
4040
4141 eval_pragger(YAML.load(File.read(configFile).toutf8),[])