[Benchmark] add encoding for CRuby 1.9

This commit is contained in:
Watson
2014-02-13 00:15:10 +09:00
parent ae04ba9d13
commit 8e60eb3861
9 changed files with 9 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_chomp(x)
multiple_eol = "The quick brown fox jumps over the lazy dog.\r\n\r\n\n\n\r\n"
no_eol = "The quick brown fox jumps over the lazy dog."

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_concat(x)
ascii = "hello"
utf8 = "こんにちは"

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_dup(x)
ascii = "The quick brown fox jumps over the lazy dog."
utf8 = "飛べねぇ豚はタダの豚だ...................."

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_equal(x)
string_a = "#{'a' * 1_001}"
first_char_different = "b#{'a' * 1_000}"

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_include(x)
x.report "include? with ASCII match" do
100000.times do

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_index(x)
string = "the"
string_utf8 = "そして"

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_new(x)
ascii = "The quick brown fox jumps over the lazy dog."
utf8 = "飛べねぇ豚はタダの豚だ...................."

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
def string_slice(x)
range = 34..40
regexp = /[aeiou](.)\1/