From d576a25c26ea6765254e7ec247f951d6bb944703 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Tue, 6 Mar 2012 23:38:33 +0000 Subject: * error.c (rb_loaderror_with_path): Adding the missing file as an instance variable to the LoadError exception. * load.c: call rb_loaderror_with_path so that the missing path is added to the exception. * ruby.c: call rb_loaderror rather than raising our own LoadError exception. * include/ruby/intern.h: add declaration for rb_loaderror_with_path. * test/ruby/test_require.rb: add supporting test for LoadError#path method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ruby/intern.h') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 6f632973f2..42f9e48c55 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -209,6 +209,7 @@ VALUE rb_exc_new(VALUE, const char*, long); VALUE rb_exc_new2(VALUE, const char*); VALUE rb_exc_new3(VALUE, VALUE); PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2); +PRINTF_ARGS(NORETURN(void rb_loaderror_with_path(VALUE path, const char*, ...)), 2, 3); PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3); PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3); NORETURN(void rb_invalid_str(const char*, const char*)); -- cgit v1.2.3