Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: JRuby-extras, Miscellaneous, Ruby 1.9.2
-
Labels:None
-
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]
-
Number of attachments :
Description
Minor shadowing warning I found running with --1.9 mode in FFI.
c:/jruby/lib/ruby/site_ruby/shared/ffi/library.rb:154 warning: shadowing outer local variable - lib
Easy fix:
>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
Fixed!
commit 2ef7719d06c0fabb44584f3bd4c38fd5534a64e3 Author: Charles Oliver Nutter <headius@headius.com> Date: Sun May 20 09:53:00 2012 -0500 Fix JRUBY-6675