J
Jagadeesh
Hi,
DATA = {}
prs = [
457678,457678-3,open
457678,457678-5,closed
457678,457678-6,open
]
prs.each do |line|
(pr, pr_scope, state) = line.split(/,/)
DATA[pr] = Hash[state, pr_scope]
end
But when I pring DATA, its having 457678,457678-6,open line. I am
overwriting earlier values with last values. What am I doing wrong?
Thanks
DATA = {}
prs = [
457678,457678-3,open
457678,457678-5,closed
457678,457678-6,open
]
prs.each do |line|
(pr, pr_scope, state) = line.split(/,/)
DATA[pr] = Hash[state, pr_scope]
end
But when I pring DATA, its having 457678,457678-6,open line. I am
overwriting earlier values with last values. What am I doing wrong?
Thanks