Skip to content
Browse files

Merge pull request #54 from jhlywa/master

More reliable check_spec'ing for Cover-compiled modules.
  • Loading branch information...
2 parents 3a43ca9 + b9db143 commit a5bd59a0b14c98c89b8e73a5b0f9d049c867ddbf @kostis kostis committed Mar 31, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/proper_typeserver.erl
View
8 src/proper_typeserver.erl
@@ -642,15 +642,15 @@ get_exp_info(Mod) ->
-spec get_code_and_exports(mod_name()) ->
rich_result2([abs_form()],mod_exp_funs()).
get_code_and_exports(Mod) ->
- case code:which(Mod) of
- ObjFileName when is_list(ObjFileName) ->
- case get_chunks(ObjFileName) of
+ case code:get_object_code(Mod) of
+ {Mod, ObjBin, _ObjFileName} ->
+ case get_chunks(ObjBin) of
{ok,_AbsCode,_ModExpFuns} = Result ->
Result;
{error,Reason} ->
get_code_and_exports_from_source(Mod, Reason)
end;
- _ErrAtom when is_atom(_ErrAtom) ->
+ error ->
get_code_and_exports_from_source(Mod, cant_find_object_file)
end.

0 comments on commit a5bd59a

Please sign in to comment.
Something went wrong with that request. Please try again.