Permalink
Browse files

fix use_in_file_templates! on windows

We were splitting on ":" and grabbing the first element
returned. i.e., the drive label.
  • Loading branch information...
1 parent 91d453f commit 971a18525a01101a28218ebd08b183f9a15f60e6 @rtomayko rtomayko committed Nov 11, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/sinatra.rb
View
3 lib/sinatra.rb
@@ -1376,7 +1376,8 @@ def helpers(&b)
end
def use_in_file_templates!
- data = IO.read(caller.first.split(':').first).split('__END__').last
+ file = caller.first.sub(/:\d+$/, '')
+ data = IO.read(file).split('__END__').last
data.gsub! /\r\n/, "\n"
current_template = nil
data.each_line do |line|

0 comments on commit 971a185

Please sign in to comment.