Skip to content

Commit

Permalink
fix a problem in #load: instead of crashing if we cannot locate the e…
Browse files Browse the repository at this point in the history
…ntry point of a .rbo file, raise an exception with a message explaining the most common problem cause instead

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5197 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Jan 28, 2011
1 parent c90ff23 commit 864df99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dln.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ dln_load(const char *file, bool call_init)
(*init_fct)();
}
else {
assert(__mrep__ != NULL);
if (__mrep__ == NULL) {
rb_raise(rb_eLoadError, "Can't load %s: entry point function not located (this can happen when you load twice the same .rbo file with a different case on a case-insensitive filesystem)", file);
}
((IMP)__mrep__)((id)rb_vm_top_self(), 0);
}

Expand Down

0 comments on commit 864df99

Please sign in to comment.