Actions
Bug #12073
closedlocal variable interferes with keyword arguments
Bug #12073:
local variable interferes with keyword arguments
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin13]
Backport:
Updated by seanlinsley (Sean Linsley) over 10 years ago
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Description updated (diff)
- Status changed from Open to Closed
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
Sean Linsley wrote:
This is also an issue with array destructuring:
You are warned.
$ ruby -w -e 'def a(*b); b; end' -e 'a=[1,2,3]' -e 'a *a'
-e:3: warning: `*' after local variable or literal is interpreted as binary operator
-e:3: warning: even though it seems like argument prefix
-e:3: warning: possibly useless use of * in void context
-e:3:in `*': no implicit conversion of Array into Integer (TypeError)
from -e:3:in `<main>'
Updated by nagachika (Tomoyuki Chikanaga) about 10 years ago
- Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE
ruby_2_3 r54618 merged revision(s) 53834,53835,53836.
Updated by usa (Usaku NAKAMURA) about 10 years ago
- Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE
ruby_2_2 r54676 merged revision(s) 53834,53835,53836.
Actions