回答編集履歴
4
Update
test
CHANGED
@@ -8,15 +8,11 @@
|
|
8
8
|
|
9
9
|
}
|
10
10
|
|
11
|
-
|
12
|
-
|
13
11
|
y = x.transform_keys{|k|
|
14
12
|
|
15
|
-
instance_exec(k.to_s.scan(/\d+/)
|
13
|
+
instance_exec(k.to_s.scan(/\d+/)){
|
16
14
|
|
17
|
-
|*i, n| [i.zip("年月日".chars).join, n]}}
|
15
|
+
|*i, n| [i.zip("年月日".chars).join, n.to_i]}}
|
18
|
-
|
19
|
-
|
20
16
|
|
21
17
|
p y
|
22
18
|
|
3
Update
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
instance_exec(k.to_s.scan(/\d+/).map(&:to_i)){
|
16
16
|
|
17
|
-
|*i, n| [i.zip("年月日".chars).
|
17
|
+
|*i, n| [i.zip("年月日".chars).join, n]}}
|
18
18
|
|
19
19
|
|
20
20
|
|
2
Update
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
instance_exec(k.to_s.scan(/\d+/).map(&:to_i)){
|
16
16
|
|
17
|
-
|i| [i
|
17
|
+
|*i, n| [i.zip("年月日".chars).flatten.join, n]}}
|
18
18
|
|
19
19
|
|
20
20
|
|
1
Update
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
y = x.transform_keys{|k|
|
14
14
|
|
15
|
-
instance_exec(
|
15
|
+
instance_exec(k.to_s.scan(/\d+/).map(&:to_i)){
|
16
16
|
|
17
17
|
|i| [i[..2].zip("年月日".chars).flatten.join, i[-1]]}}
|
18
18
|
|