lib/allocation_stats/allocation.rb in allocation_stats-0.1.3 vs lib/allocation_stats/allocation.rb in allocation_stats-0.1.4
- old
+ new
@@ -57,15 +57,15 @@
# * the Gem directory (where all gems lie) is aliased to "<GEMDIR>"
#
# @return the source file, aliased.
def sourcefile_alias
case
- when @sourcefile[PWD]
- @sourcefile.sub(PWD, "<PWD>")
when @sourcefile[AllocationStats::RUBYLIBDIR]
@sourcefile.sub(AllocationStats::RUBYLIBDIR, "<RUBYLIBDIR>")
when @sourcefile[AllocationStats::GEMDIR]
@sourcefile.sub(/#{AllocationStats::GEMDIR}\/gems\/([^\/]+)\//, '<GEM:\1>/')
+ when @sourcefile[PWD]
+ @sourcefile.sub(PWD, "<PWD>")
else
@sourcefile
end
end