"Symbol to string"의 두 판 사이의 차이

7번째 줄: 7번째 줄:
my_symbol = :hello
my_symbol = :hello
str = my_symbol.to_s
str = my_symbol.to_s
print str
puts str.class
# String
puts str
# hello
# hello
</source>
</source>

2014년 5월 31일 (토) 23:19 판

symbol to string

1 Ruby

my_symbol = :hello
str = my_symbol.to_s
puts str.class
# String
puts str
# hello

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}