Skip to content
This repository
Newer
Older
100644 49 lines (42 sloc) 0.974 kb
1d22b2ce »
2011-03-30 new screenshots and revisions to README for website
1 # ruby test file ruby.rb
2
3 include Enumerable
4
5 def initialize(rbconfig)
6 @rbconfig = rbconfig
7 @no_harm = false
8 end
9
10 def load_savefile
11 begin
12 File.foreach(savefile()) do |line|
13 k, v = *line.split(/=/, 2)
14 self[k] = v.strip
15 end
16 rescue Errno::ENOENT
17 setup_rb_error $!.message + "\n#{File.basename($0)} config first"
18 end
19 end
20
21 if c['rubylibdir']
22 # V > 1.6.3
23 libruby = "#{c['prefix']}/lib/ruby"
24 siterubyverarch = c['sitearchdir']
25 end
26 parameterize = lambda {|path|
27 path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix')
28 }
29
30 if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
31 makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
32 else
33 makeprog = 'make'
34 end
35
36 def setup_rb_error(msg)
37 raise SetupError, msg
38 end
39
40 if $0 == __FILE__
41 begin
42 ToplevelInstaller.invoke
43 rescue SetupError
44 raise if $DEBUG
45 $stderr.puts $!.message
46 $stderr.puts "Try 'ruby #{$0} --help' for detailed usage."
47 exit 1
48 end
49 end
Something went wrong with that request. Please try again.