summaryrefslogtreecommitdiff
path: root/lib/coderay/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/helpers')
-rw-r--r--lib/coderay/helpers/plugin.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb
index 67d55c8..246b9b4 100644
--- a/lib/coderay/helpers/plugin.rb
+++ b/lib/coderay/helpers/plugin.rb
@@ -180,10 +180,11 @@ protected
#
# This is done automatically when plugin_path is called.
def load_map
- begin
- require path_to('_map')
- rescue LoadError
- warn 'no _map.rb found for %s' % name if $DEBUG
+ mapfile = path_to '_map'
+ if File.exist? mapfile
+ require mapfile
+ elsif $DEBUG
+ warn 'no _map.rb found for %s' % name
end
end