public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
Added file and line info whenever possible.
Wed Feb 13 19:15:12 -0800 2008
commit  cd3b7127461dd8dcd19a801f412f926daf2d2848
tree    22284073b9ea2a4b849660a5f386520fb175a158
parent  d2c44ce888d7c85caa41b7e0e9df816f87f1bdce
...
384
385
386
387
 
388
389
390
...
384
385
386
 
387
388
389
390
0
@@ -384,7 +384,7 @@
0
 
0
   def self.run
0
     if File.exists?(Merb.dir_for(:config) / "rack.rb")
0
- Merb::Config[:app] = eval("::Rack::Builder.new {( #{IO.read(Merb.dir_for(:config) / 'rack.rb')}\n )}.to_app", TOPLEVEL_BINDING)
0
+ Merb::Config[:app] = eval("::Rack::Builder.new {( #{IO.read(Merb.dir_for(:config) / 'rack.rb')}\n )}.to_app", TOPLEVEL_BINDING, __FILE__, __LINE__)
0
     else
0
       Merb::Config[:app] = ::Merb::Rack::Application.new
0
     end
...
42
43
44
45
46
47
 
 
48
49
50
...
42
43
44
 
 
 
45
46
47
48
49
0
@@ -42,9 +42,8 @@
0
         {:request_headers => values,
0
          :transform_method => transform_method,
0
          :response_headers => new_response_headers })
0
-
0
- Merb::RenderMixin.class_eval <<-EOS
0
-
0
+ code =
0
+ Merb::RenderMixin.class_eval <<-EOS, __FILE__, __LINE__
0
         # DOC: Yehuda Katz FAILED
0
         def render_#{key}(thing = nil, opts = {})
0
           content_type = :#{key}
...
122
123
124
125
 
126
127
128
...
122
123
124
 
125
126
127
128
0
@@ -122,7 +122,7 @@
0
 
0
       # DOC: Yehuda Katz FAILED
0
       def _buffer( the_binding )
0
- @_buffer = eval( "_buf", the_binding )
0
+ @_buffer = eval( "_buf", the_binding, __FILE__, __LINE__)
0
       end
0
 
0
       # Capture allows you to extract a part of the template into an
...
61
62
63
64
 
65
66
67
...
80
81
82
83
 
84
85
86
...
102
103
104
105
 
106
107
108
...
124
125
126
127
 
128
129
130
...
61
62
63
 
64
65
66
67
...
80
81
82
 
83
84
85
86
...
102
103
104
 
105
106
107
108
...
124
125
126
 
127
128
129
130
0
@@ -61,7 +61,7 @@
0
   def class_inheritable_reader(*syms)
0
     syms.each do |sym|
0
       next if sym.is_a?(Hash)
0
- class_eval <<-EOS
0
+ class_eval <<-EOS, __FILE__, __LINE__
0
 
0
         # DOC: Yehuda Katz FAILED
0
         def self.#{sym}
0
@@ -80,7 +80,7 @@
0
   def class_inheritable_writer(*syms)
0
     options = syms.last.is_a?(Hash) ? syms.pop : {}
0
     syms.each do |sym|
0
- class_eval <<-EOS
0
+ class_eval <<-EOS, __FILE__, __LINE__
0
 
0
         # DOC: Yehuda Katz FAILED
0
         def self.#{sym}=(obj)
0
@@ -102,7 +102,7 @@
0
   def class_inheritable_array_writer(*syms)
0
     options = syms.last.is_a?(Hash) ? syms.pop : {}
0
     syms.each do |sym|
0
- class_eval <<-EOS
0
+ class_eval <<-EOS, __FILE__, __LINE__
0
 
0
         # DOC: Yehuda Katz FAILED
0
         def self.#{sym}=(obj)
0
@@ -124,7 +124,7 @@
0
   def class_inheritable_hash_writer(*syms)
0
     options = syms.last.is_a?(Hash) ? syms.pop : {}
0
     syms.each do |sym|
0
- class_eval <<-EOS
0
+ class_eval <<-EOS, __FILE__, __LINE__
0
 
0
         # DOC: Yehuda Katz FAILED
0
         def self.#{sym}=(obj)
...
192
193
194
195
 
196
197
198
...
192
193
194
 
195
196
197
198
0
@@ -192,7 +192,7 @@
0
     # Generate the following logging methods for Merb.logger as described in the api:
0
     # :fatal, :error, :warn, :info, :debug
0
     Levels.each_pair do |name, number|
0
- class_eval <<-LEVELMETHODS
0
+ class_eval <<-LEVELMETHODS, __FILE__, __LINE__
0
 
0
       # DOC
0
       def #{name}(message = nil, &block)
...
13
14
15
16
 
17
18
 
19
20
21
...
13
14
15
 
16
17
 
18
19
20
21
0
@@ -13,9 +13,9 @@
0
       def self.start(opts={})
0
         if opts[:runner_code]
0
           if File.exists?(opts[:runner_code])
0
- eval(File.read(opts[:runner_code]), TOPLEVEL_BINDING)
0
+ eval(File.read(opts[:runner_code]), TOPLEVEL_BINDING, __FILE__, __LINE__)
0
           else
0
- eval(opts[:runner_code], TOPLEVEL_BINDING)
0
+ eval(opts[:runner_code], TOPLEVEL_BINDING, __FILE__, __LINE__)
0
           end
0
           exit!
0
         end
...
7
8
9
10
 
11
12
13
...
7
8
9
 
10
11
12
13
0
@@ -7,7 +7,7 @@
0
     x
0
   end
0
 
0
- class_eval <<-EOS
0
+ class_eval <<-EOS, __FILE__, __LINE__
0
 
0
     def #{:bar}(x)
0
       x
...
10
11
12
13
 
14
15
16
...
10
11
12
 
13
14
15
16
0
@@ -10,7 +10,7 @@
0
 
0
 class Bar
0
   (1..10_000).each do |num|
0
- class_eval <<-METH
0
+ class_eval <<-METH, __FILE__, __LINE__
0
       def meth#{num}
0
         #{num}
0
       end
...
20
21
22
23
 
24
25
26
...
20
21
22
 
23
24
25
26
0
@@ -20,7 +20,7 @@
0
   
0
   x.report("eval") do
0
     TIMES.times do
0
- eval evall
0
+ eval evall, binding, __FILE__, __LINE__
0
     end
0
   end
0
   
...
37
38
39
40
41
42
43
...
37
38
39
 
40
41
42
0
@@ -37,7 +37,6 @@
0
       table = { "\r"=>"\\r", "\n"=>"\\n", "\t"=>"\\t", '"'=>'\\"', "\\"=>"\\\\" }
0
       text = (text.split("\n").map {|x| '"' + (x.gsub(/[\r\n\t"\\]/) { |m| table[m] }) + '"'}).join(" +\n")
0
       mod.class_eval <<-EOS, path
0
-
0
         def #{name}
0
           #{text}
0
         end

Comments

    No one has commented yet.