diff options
Diffstat (limited to 'runtime/autoload/rubycomplete.vim')
-rw-r--r-- | runtime/autoload/rubycomplete.vim | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index 47c77d93d..87e6c9a0f 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -301,7 +301,7 @@ class VimRubyCompletion def get_buffer_entity(name, vimfun) loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - return nil if loading_allowed != '1' + return nil if loading_allowed.to_i.zero? return nil if /(\"|\')+/.match( name ) buf = VIM::Buffer.current nums = eval( VIM::evaluate( vimfun % name ) ) @@ -368,7 +368,7 @@ class VimRubyCompletion # this will be a little expensive. loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global") - return [] if allow_aggressive_load != '1' || loading_allowed != '1' + return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero? buf = VIM::Buffer.current eob = buf.length @@ -401,7 +401,7 @@ class VimRubyCompletion def load_rails allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") - return if allow_rails != '1' + return if allow_rails.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') file_name = VIM::evaluate('expand("%:t")') @@ -461,7 +461,7 @@ class VimRubyCompletion def get_rails_helpers allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') buf_path.gsub!( /\\/, "/" ) @@ -511,7 +511,7 @@ class VimRubyCompletion def add_rails_columns( cls ) allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? begin eval( "#{cls}.establish_connection" ) @@ -534,7 +534,7 @@ class VimRubyCompletion def get_rails_view_methods allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') buf_path.gsub!( /\\/, "/" ) @@ -580,7 +580,7 @@ class VimRubyCompletion def get_completions(base) loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - if loading_allowed == '1' + if loading_allowed.to_i == 1 load_requires load_rails end |