[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>

Hello,

9 messages 2017/10/04

[ruby-core:83306] Re: [Ruby trunk Bug#13872] Duplicate assignment no longer silences "assigned but unused variable" warning

From: Eric Wong <normalperson@...>
Date: 2017-10-16 04:06:56 UTC
List: ruby-core #83306
[email protected] wrote:
> Please upgrade your code to actually "use" all the assigned
> local variables, in this case, to `var = "foo"; var = var`.

The problem is with binding:

	require 'erb'
	foo = :bar
	puts ERB.new('<%= foo %>').result(binding)

The above uses foo, but binding isn't handled by the parser.
Maybe the parser should not warn if the word `binding'
appears in scope?  And check for local variables named
`binding'...

But yes, this is annoying with ERB when I want my code
to be warning-clean.

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next