From: Yusuke ENDOH Date: 2007-12-21T00:27:26+09:00 Subject: Re: named captures assigning to local variables Hi, 2007/12/20, Joel VanderWerf : > > My proposal (a patch is below) is to treat named capture assignment as a > > new form of assignment. That is: allow regexp literals as lvalues in > > assignment. So instead of using =~, we use =. The match is still > > performed with =~, but because we use the assignment operator it is > > clear that assignment is happening. For example: > > > > /(?.)(?.)/ = 'foo' > > firstchar # => 'f' > > secondchar # => 'o' > > Very nice. Since = is not an operator (and not a method), a certain > amount of magic is acceptable (to me). Methods should just be methods. I prefer it too. Matz, what do you think? -- Yusuke ENDOH