Ruby n, 1 = gets.split.map &:to_i -


this question has answer here:

i looking @ ruby code. unsure happening on line:

n,1 = gets.split.map &:to_i 

i understand input array of strings being mapped array of integers why being assigned n,1?

that line of code doesn't anything, it's syntaxerror. can't assign 1, that's not legal name local variable.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

c# - ItextSharp font color issue in ver 5.5.4+ -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -