Created
August 4, 2011 11:12
-
-
Save kkosuge/1124975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 配列風の文字列を配列にする方法 | |
str = "[1,'hoge']" | |
ary = eval(str) #怖い.... | |
ary = str[1..-2].split(',') | |
# なんかいい方法ないかな |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment