From e127b7d57b06554e708752bbbc2a85e833633c26 Mon Sep 17 00:00:00 2001 From: murphy Date: Mon, 7 Jan 2008 14:42:47 +0000 Subject: Lib: - Encoder: removed a warning - Encoders::HTML: don't shadow outer variable - Plugin: move require_plugin into class namespace - Ruby Scanner: - "alias" keyword recognition - better regexp/division distinction - recognize ~, !, !=, and !~ as method names (partly Ruby 1.9 only) - reordered states for speed Tests: - updated coderay-suite to use gem instead of require_gem - general improvements (more colors!, new parameter: new, new syntax lang.test for only and new) - fixed ruby suite - adjusted a lot of Ruby tests (alias uses methods now) - new tests: ruby/operators, ruby/regexp Samples: - fixed/updated ('bout time) Rake tasks: - updated to use new rubygems API --- lib/coderay/helpers/plugin.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/coderay/helpers') diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb index e6017d5..e1a945f 100644 --- a/lib/coderay/helpers/plugin.rb +++ b/lib/coderay/helpers/plugin.rb @@ -22,7 +22,7 @@ module CodeRay # # Generators[:fancy] #-> FancyGenerator # # or -# require_plugin 'Generators/fancy' +# CodeRay.require_plugin 'Generators/fancy' module PluginHost # Raised if Encoders::[] fails because: @@ -318,7 +318,7 @@ end # CodeRay.require_plugin '/' # # Returns the loaded plugin. -def require_plugin path +def self.require_plugin path host_id, plugin_id = path.split '/', 2 host = PluginHost.host_by_id(host_id) raise PluginHost::HostNotFound, -- cgit v1.2.1