多行字符串的表示方式

原文载于:http://robinwu.iteye.com/blog/145514

 

其中最重要的、忽略一切转义字符、多行大包围、相当于''的多行版本

1 str = <<'EOF'   
2 This isn't a tab: \t
3 and this isn't a newline: \n
4 EOF
5
6 puts str



posted @ 2011-11-04 15:05  klobodnf  阅读(170)  评论(0编辑  收藏  举报