lib/cliutils/prefs/pref.rb in cliutils-2.1.0 vs lib/cliutils/prefs/pref.rb in cliutils-2.1.1
- old
+ new
@@ -298,10 +298,10 @@
# Try to load and instantiate the asset. If that fails, warn
# the user with a message and skip over it.
begin
require File.expand_path(asset_path)
- Object.const_get("CLIUtils::#{ asset_name }").new
+ Object.const_get('CLIUtils').const_get(asset_name).new
rescue LoadError => e
messenger.warn("Skipping undefined Pref #{ @@asset_labels[type][:class_suffix] }: #{ path_or_name }")
nil
end
end