Daniel Berger created JRUBY-6675: ------------------------------------ Summary: shadowing outer local variable warning in ffi Key: JRUBY-6675 URL: https://jira.codehaus.org/browse/JRUBY-6675 Project: JRuby Issue Type: Bug Components: JRuby-extras, Miscellaneous, Ruby 1.9.2 Affects Versions: JRuby 1.6.7 Environment: jruby 1.6.7.2 (ruby-1.8.7-p357) (2012-05-01 26e08ba) (Java HotSpot(TM) Client VM 1.6.0_31) [Windows 7-x86-java] Reporter: Daniel Berger Priority: Trivial
Minor shadowing warning I found running with --1.9 mode in FFI. {noformat} c:/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:154 warning: shadowing outer local variable - lib {noformat} Easy fix: {noformat} >diff -u library.orig library.rb --- library.orig Sun May 20 06:31:21 2012 +++ library.rb Sun May 20 05:40:32 2012 @@ -151,7 +151,7 @@ if invokers.empty? begin function = lib.find_function(cname.to_s) - raise FFI::NotFoundError.new(cname.to_s, *ffi_libraries.map { |lib| lib.name }) unless function + raise FFI::NotFoundError.new(cname.to_s, *ffi_libraries.map { |clib| clib.name }) unless function invokers << if arg_types.length > 0 && arg_types[arg_types.length - 1] == FFI::NativeType::VARARGS FFI::VariadicInvoker.new(arg_types, find_type(ret_type), function, options) else {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email