摘要: 1,问题在写一个统计代码行数的脚本时遇到一个问题:代码:file_name = "code.rb"c = 0File.foreach(file_name) do |x| next unless x !~ /^\s*(#|\s*$)/ c = c + 1end运行的时候报错ArgumentError: invalid byte sequence in GBK =~ at org/jruby/RubyRegexp.java:1486 =~ at org/jruby/RubyString.java:1652 !~ at org/jruby... 阅读全文
posted @ 2013-12-18 13:35 范孝鹏 阅读(2603) 评论(0) 推荐(1) 编辑