Fix the executable load error under 1.9.2.

Closes gh-309
This commit is contained in:
Nathan Weizenbaum 2010-10-26 00:27:50 -07:00
parent 43b4e23c03
commit 934b520edd
3 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,10 @@
* Table of contents
{:toc}
## 3.0.23 (Unreleased)
* Fix the error message for unloadable modules when running the executables under Ruby 1.9.2.
## 3.0.22
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.22).

View File

@ -3,6 +3,10 @@
* Table of contents
{:toc}
## 3.0.23 (Unreleased)
* Fix the error message for unloadable modules when running the executables under Ruby 1.9.2.
## 3.0.22
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.22).

View File

@ -155,7 +155,7 @@ module Haml
end
def handle_load_error(err)
dep = err.message.scan(/^no such file to load -- (.*)/)[0]
dep = err.message[/^no such file to load -- (.*)/, 1]
raise err if @options[:trace] || dep.nil? || dep.empty?
$stderr.puts <<MESSAGE
Required dependency #{dep} not found!