opal 1.1.0.rc1 → 1.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +4 -4
  3. data/.github/ISSUE_TEMPLATE/bug-report.md +47 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. data/.github/workflows/build.yml +11 -5
  6. data/.gitignore +1 -0
  7. data/.jshintrc +1 -1
  8. data/CHANGELOG.md +42 -1
  9. data/Gemfile +0 -4
  10. data/HACKING.md +1 -1
  11. data/LICENSE +1 -1
  12. data/README.md +20 -16
  13. data/UNRELEASED.md +32 -95
  14. data/benchmark-ips/bm_array_unshift.rb +7 -0
  15. data/benchmark-ips/bm_js_symbols_vs_strings.rb +7 -2
  16. data/bin/build-browser-source-map-support +2 -3
  17. data/bin/opal-mspec +2 -0
  18. data/docs/compiler.md +1 -1
  19. data/examples/rack/Gemfile +0 -1
  20. data/examples/rack/Gemfile.lock +0 -4
  21. data/lib/opal/cli.rb +1 -0
  22. data/lib/opal/cli_options.rb +4 -0
  23. data/lib/opal/cli_runners/nodejs.rb +5 -1
  24. data/lib/opal/cli_runners/source-map-support-browser.js +8 -2
  25. data/lib/opal/cli_runners/source-map-support-node.js +3706 -0
  26. data/lib/opal/cli_runners/source-map-support.js +3 -1
  27. data/lib/opal/compiler.rb +2 -2
  28. data/lib/opal/nodes/args/arity_check.rb +1 -0
  29. data/lib/opal/nodes/args/parameters.rb +6 -0
  30. data/lib/opal/nodes/class.rb +1 -13
  31. data/lib/opal/nodes/literal.rb +14 -7
  32. data/lib/opal/nodes/module.rb +13 -9
  33. data/lib/opal/nodes/variables.rb +13 -4
  34. data/lib/opal/nodes/while.rb +54 -17
  35. data/lib/opal/parser.rb +1 -5
  36. data/lib/opal/parser/patch.rb +34 -0
  37. data/lib/opal/repl.rb +7 -0
  38. data/lib/opal/rewriter.rb +2 -0
  39. data/lib/opal/rewriters/arguments.rb +4 -1
  40. data/lib/opal/rewriters/forward_args.rb +54 -0
  41. data/lib/opal/rewriters/logical_operator_assignment.rb +5 -2
  42. data/lib/opal/rewriters/opal_engine_check.rb +5 -7
  43. data/lib/opal/version.rb +1 -1
  44. data/opal.gemspec +1 -1
  45. data/opal/corelib/array.rb +42 -20
  46. data/opal/corelib/array/pack.rb +6 -1
  47. data/opal/corelib/complex.rb +2 -0
  48. data/opal/corelib/constants.rb +3 -3
  49. data/opal/corelib/hash.rb +36 -38
  50. data/opal/corelib/module.rb +2 -7
  51. data/opal/corelib/number.rb +2 -180
  52. data/opal/corelib/numeric.rb +156 -0
  53. data/opal/corelib/object_space.rb +102 -0
  54. data/opal/corelib/random.rb +31 -66
  55. data/opal/corelib/random/formatter.rb +122 -0
  56. data/opal/corelib/range.rb +50 -19
  57. data/opal/corelib/runtime.js +82 -21
  58. data/opal/corelib/string.rb +86 -52
  59. data/opal/corelib/string/encoding.rb +140 -25
  60. data/opal/corelib/string/unpack.rb +26 -40
  61. data/opal/opal.rb +1 -0
  62. data/opal/opal/full.rb +1 -0
  63. data/package.json +1 -1
  64. data/spec/filters/bugs/array.rb +0 -22
  65. data/spec/filters/bugs/basicobject.rb +3 -0
  66. data/spec/filters/bugs/encoding.rb +0 -2
  67. data/spec/filters/bugs/exception.rb +1 -0
  68. data/spec/filters/bugs/float.rb +0 -2
  69. data/spec/filters/bugs/hash.rb +2 -7
  70. data/spec/filters/bugs/integer.rb +0 -2
  71. data/spec/filters/bugs/kernel.rb +16 -3
  72. data/spec/filters/bugs/language.rb +6 -14
  73. data/spec/filters/bugs/marshal.rb +1 -3
  74. data/spec/filters/bugs/module.rb +16 -1
  75. data/spec/filters/bugs/numeric.rb +4 -12
  76. data/spec/filters/bugs/objectspace.rb +67 -0
  77. data/spec/filters/bugs/pack_unpack.rb +0 -9
  78. data/spec/filters/bugs/pathname.rb +1 -0
  79. data/spec/filters/bugs/proc.rb +8 -0
  80. data/spec/filters/bugs/random.rb +3 -6
  81. data/spec/filters/bugs/range.rb +83 -113
  82. data/spec/filters/bugs/set.rb +2 -0
  83. data/spec/filters/bugs/string.rb +31 -70
  84. data/spec/filters/bugs/struct.rb +2 -0
  85. data/spec/filters/bugs/time.rb +8 -2
  86. data/spec/filters/unsupported/float.rb +3 -0
  87. data/spec/filters/unsupported/freeze.rb +1 -0
  88. data/spec/filters/unsupported/integer.rb +3 -0
  89. data/spec/filters/unsupported/refinements.rb +5 -0
  90. data/spec/filters/unsupported/string.rb +100 -95
  91. data/spec/filters/unsupported/time.rb +4 -0
  92. data/spec/lib/compiler_spec.rb +16 -0
  93. data/spec/lib/rewriters/forward_args_spec.rb +61 -0
  94. data/spec/lib/rewriters/logical_operator_assignment_spec.rb +1 -1
  95. data/spec/lib/rewriters/numblocks_spec.rb +44 -0
  96. data/spec/lib/rewriters/opal_engine_check_spec.rb +49 -4
  97. data/spec/opal/core/language/forward_args_spec.rb +53 -0
  98. data/spec/opal/core/language/infinite_range_spec.rb +13 -0
  99. data/spec/opal/core/language/memoization_spec.rb +16 -0
  100. data/spec/opal/core/module_spec.rb +38 -2
  101. data/spec/opal/core/number/to_i_spec.rb +28 -0
  102. data/spec/opal/core/runtime/bridged_classes_spec.rb +16 -0
  103. data/spec/opal/core/runtime/constants_spec.rb +20 -1
  104. data/spec/opal/core/string/subclassing_spec.rb +16 -0
  105. data/spec/opal/core/string/unpack_spec.rb +22 -0
  106. data/spec/opal/core/string_spec.rb +4 -4
  107. data/spec/ruby_specs +4 -1
  108. data/stdlib/json.rb +3 -1
  109. data/stdlib/securerandom.rb +55 -35
  110. data/tasks/testing.rake +6 -3
  111. data/test/nodejs/test_string.rb +25 -0
  112. data/vendored-minitest/minitest/assertions.rb +2 -0
  113. metadata +35 -12
  114. data/lib/opal/parser/with_c_lexer.rb +0 -15
@@ -10,6 +10,8 @@ opal_filter "Struct" do
10
10
  fails "Struct#deconstruct_keys returns an empty hash when there are more keys than attributes" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
11
11
  fails "Struct#deconstruct_keys returns at first not existing attribute name" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2>
12
12
  fails "Struct#deconstruct_keys returns only specified keys" # NoMethodError: undefined method `deconstruct_keys' for #<struct x=1, y=2, z=3>
13
+ fails "Struct#dig returns the value by the index" # Expected nil == "one" to be truthy but was false
14
+ fails "Struct#hash returns different hashes for different struct classes" # Expected "Hash" != "Hash" to be truthy but was false
13
15
  fails "Struct#hash returns different hashes for structs with different values when using keyword_init: true" # NameError: wrong constant name 1 non symbol member
14
16
  fails "Struct#hash returns different hashes for structs with different values" # Expected "Hash" == "Hash" to be falsy but was true
15
17
  fails "Struct#hash returns the same fixnum for structs with the same content"
@@ -27,8 +27,12 @@ opal_filter "Time" do
27
27
  fails "Time#hash returns an Integer" # Expected "Time:100000" (String) to be an instance of Integer
28
28
  fails "Time#inspect formats nanoseconds as a Rational" # NoMethodError: undefined method `nsec' for 2007-11-01 15:25:00 UTC
29
29
  fails "Time#inspect formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
30
- fails "Time#inspect formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'" # Expected "2000-01-01 20:15:01 +1200" to equal "2000-01-01 20:15:01 +0100"
30
+ fails "Time#inspect omits trailing zeros from microseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.1 UTC" to be truthy but was false
31
+ fails "Time#inspect preserves microseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.123456 UTC" to be truthy but was false
31
32
  fails "Time#inspect preserves milliseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.123456 UTC" to be truthy but was false
33
+ fails "Time#inspect preserves nanoseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.123456789 UTC" to be truthy but was false
34
+ fails "Time#inspect uses the correct time zone with microseconds" # NoMethodError: undefined method `localtime' for 2000-01-01 00:00:00 UTC
35
+ fails "Time#inspect uses the correct time zone without microseconds" # NoMethodError: undefined method `localtime' for 2000-01-01 00:00:00 UTC
32
36
  fails "Time#localtime raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
33
37
  fails "Time#nsec returns a positive value for dates before the epoch" # NoMethodError: undefined method `nsec' for 1969-11-12 13:18:57 UTC
34
38
  fails "Time#round copies own timezone to the returning value"
@@ -39,6 +43,7 @@ opal_filter "Time" do
39
43
  fails "Time#strftime rounds an offset to the nearest second when formatting with %z"
40
44
  fails "Time#strftime should be able to print the commercial year with leading zeroes"
41
45
  fails "Time#strftime should be able to print the commercial year with only two digits"
46
+ fails "Time#strftime should be able to show default Logger format" # Expected "2001-12-03T04:05:06.000000 " == "2001-12-03T04:05:06.100000 " to be truthy but was false
42
47
  fails "Time#strftime should be able to show the commercial week day"
43
48
  fails "Time#strftime should be able to show the number of seconds since the unix epoch" # fails under FIJI et al TZs
44
49
  fails "Time#strftime should be able to show the timezone if available"
@@ -54,7 +59,6 @@ opal_filter "Time" do
54
59
  fails "Time#to_f returns the float number of seconds + usecs since the epoch"
55
60
  fails "Time#to_i rounds fractional seconds toward zero" # Expected -315619200 == -315619199 to be truthy but was false
56
61
  fails "Time#to_s formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
57
- fails "Time#to_s formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'" # Expected "2000-01-01 20:15:01 +1200" to equal "2000-01-01 20:15:01 +0100"
58
62
  fails "Time#tv_sec rounds fractional seconds toward zero" # Expected -315619200 == -315619199 to be truthy but was false
59
63
  fails "Time#usec returns a positive value for dates before the epoch" # Expected 0 to equal 404240
60
64
  fails "Time#utc converts self to UTC, modifying the receiver" # Expected 2007-01-09 03:00:00 UTC to equal 2007-01-09 12:00:00 UTC
@@ -64,6 +68,8 @@ opal_filter "Time" do
64
68
  fails "Time.at :in keyword argument could be UTC offset as a number of seconds" # TypeError: no implicit conversion of Hash into Integer
65
69
  fails "Time.at :in keyword argument could be a timezone object" # TypeError: no implicit conversion of Hash into Integer
66
70
  fails "Time.at passed Numeric passed BigDecimal doesn't round input value"
71
+ fails "Time.at passed Numeric passed Rational returns Time with correct microseconds" # Expected 0 == 539759 to be truthy but was false
72
+ fails "Time.at passed Numeric passed Rational returns Time with correct nanoseconds" # Expected 0 == 539759 to be truthy but was false
67
73
  fails "Time.at passed Numeric roundtrips a Rational produced by #to_r"
68
74
  fails "Time.at passed [Time, Numeric, format] :microsecond format traits second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
69
75
  fails "Time.at passed [Time, Numeric, format] :microsecond format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3 for -2)
@@ -27,6 +27,9 @@ opal_unsupported_filter "Float" do
27
27
  fails "Float constant MIN is 2.2250738585072e-308"
28
28
  fails "Float constant MIN_10_EXP is -308"
29
29
  fails "Float constant MIN_EXP is -1021"
30
+ fails "Float#<=> returns -1 when self is -Infinity and other is negative" # Expected 0 == -1
31
+ fails "Float#<=> returns 1 when self is Infinity and other is an Integer" # Expected 0 == 1
32
+ fails "Float#<=> returns 1 when self is negative and other is -Infinity" # Expected 0 == 1
30
33
  fails "Float#coerce returns [other, self] both as Floats"
31
34
  fails "Float#eql? returns false if other is not a Float"
32
35
  fails "Float#to_s emits '-' for -0.0"
@@ -73,6 +73,7 @@ opal_unsupported_filter "freezing" do
73
73
  fails "Enumerable#sort doesn't raise an error if #to_a returns a frozen Array"
74
74
  fails "Enumerator#initialize on frozen instance raises a RuntimeError"
75
75
  fails "FalseClass#to_s returns a frozen string" # Expected "false".frozen? to be truthy but was false
76
+ fails "File.basename returns a new unfrozen String" # Expected "foo.rb" not to be identical to "foo.rb"
76
77
  fails "FrozenError#receiver should return frozen object that modification was attempted on" # RuntimeError: RuntimeError
77
78
  fails "FrozenError.new should take optional receiver argument" # NoMethodError: undefined method `receiver' for #<FrozenError: msg>
78
79
  fails "Hash literal does not change encoding of literal string keys during creation"
@@ -24,6 +24,9 @@ opal_unsupported_filter "Integer" do
24
24
  fails "Integer#<< (with n << m) fixnum returns an Bignum == fixnum_max * 2 when fixnum_max << 1 and n > 0" # Expected 2147483646 (Number) to be an instance of Bignum
25
25
  fails "Integer#<< (with n << m) fixnum returns an Bignum == fixnum_min * 2 when fixnum_min << 1 and n < 0" # Expected -2147483648 (Number) to be an instance of Bignum
26
26
  fails "Integer#<= bignum returns false if compares with near float" # Expected true to equal false
27
+ fails "Integer#<=> bignum returns -1 when self is -Infinity and other is negative" # Expected 0 == -1
28
+ fails "Integer#<=> bignum returns 1 when self is Infinity and other is a Bignum" # Expected 0 == 1
29
+ fails "Integer#<=> bignum returns 1 when self is negative and other is -Infinity" # Expected 0 == 1
27
30
  fails "Integer#<=> bignum with a Bignum when other is negative returns -1 when self is negative and other is larger" # Expected 0 to equal -1
28
31
  fails "Integer#<=> bignum with a Bignum when other is negative returns 1 when self is negative and other is smaller" # Expected 0 to equal 1
29
32
  fails "Integer#<=> bignum with a Bignum when other is positive returns -1 when self is positive and other is larger" # Expected 0 to equal -1
@@ -0,0 +1,5 @@
1
+ # NOTE: run bin/format-filters after changing this file
2
+ opal_unsupported_filter "Refinements" do
3
+ fails "Kernel#eval with refinements activates refinements from the binding" # NoMethodError: undefined method `refine' for #<Module:0x7ad6a>
4
+ fails "Kernel#eval with refinements activates refinements from the eval scope" # NoMethodError: undefined method `refine' for #<Module:0x7ad6e>
5
+ end
@@ -1,17 +1,7 @@
1
1
  # NOTE: run bin/format-filters after changing this file
2
2
  opal_unsupported_filter "String" do
3
3
  fails "BasicObject#__id__ returns a different value for two String literals"
4
- fails "Ruby character strings Unicode escaping can be done with \\u{} and one to six hex digits"
5
- fails "Ruby character strings Unicode escaping with ASCII_8BIT source encoding produces a UTF-8-encoded string when escaping non-ASCII characters via \\u" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:UTF-8>
6
- fails "Ruby character strings Unicode escaping with ASCII_8BIT source encoding produces a UTF-8-encoded string when escaping non-ASCII characters via \\u{}" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:UTF-8>
7
- fails "Ruby character strings Unicode escaping with ASCII_8BIT source encoding produces an ASCII string when escaping ASCII characters via \\u" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
8
- fails "Ruby character strings Unicode escaping with ASCII_8BIT source encoding produces an ASCII string when escaping ASCII characters via \\u{}" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT>
9
- fails "Ruby character strings Unicode escaping with US-ASCII source encoding produces a UTF-8-encoded string when escaping non-ASCII characters via \\u"
10
- fails "Ruby character strings Unicode escaping with US-ASCII source encoding produces a UTF-8-encoded string when escaping non-ASCII characters via \\u{}"
11
- fails "Ruby character strings Unicode escaping with US-ASCII source encoding produces an ASCII string when escaping ASCII characters via \\u"
12
- fails "Ruby character strings Unicode escaping with US-ASCII source encoding produces an ASCII string when escaping ASCII characters via \\u{}"
13
- fails "Ruby character strings are produced from control character shortcuts"
14
- fails "Ruby character strings backslashes follow the same rules as interpolation"
4
+ fails "Module#const_defined? returns true when passed a constant name with EUC-JP characters"
15
5
  fails "Ruby character strings taints the result of interpolation when an interpolated value is tainted"
16
6
  fails "Ruby character strings untrusts the result of interpolation when an interpolated value is untrusted"
17
7
  fails "String#% always taints the result when the format string is tainted"
@@ -20,19 +10,8 @@ opal_unsupported_filter "String" do
20
10
  fails "String#% taints result for %s when argument is tainted"
21
11
  fails "String#* always taints the result when self is tainted"
22
12
  fails "String#+ taints the result when self or other is tainted"
23
- fails "String#+ when self and the argument are in different ASCII-compatible encodings raises Encoding::CompatibilityError if neither are ASCII-only"
24
- fails "String#+ when self and the argument are in different ASCII-compatible encodings uses self's encoding if both are ASCII-only"
25
- fails "String#+ when self and the argument are in different ASCII-compatible encodings uses self's encoding if the argument is ASCII-only"
26
- fails "String#+ when self and the argument are in different ASCII-compatible encodings uses the argument's encoding if self is ASCII-only"
27
- fails "String#+ when self is ASCII-8BIT and argument is US-ASCII uses ASCII-8BIT encoding"
28
- fails "String#+ when self is in an ASCII-incompatible encoding incompatible with the argument's encoding raises Encoding::CompatibilityError if neither are empty"
29
- fails "String#+ when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses self's encoding if both are empty"
30
- fails "String#+ when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses self's encoding if the argument is empty"
31
- fails "String#+ when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses the argument's encoding if self is empty"
32
- fails "String#+ when the argument is in an ASCII-incompatible encoding incompatible with self's encoding raises Encoding::CompatibilityError if neither are empty"
33
- fails "String#+ when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses self's encoding if both are empty"
34
- fails "String#+ when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses self's encoding if the argument is empty"
35
- fails "String#+ when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses the argument's encoding if self is empty"
13
+ fails "String#-@ deduplicates frozen strings" # May fail randomly outside of "use strict"
14
+ fails "String#-@ returns a frozen copy if the String is not frozen" # May fail randomly outside of "use strict"
36
15
  fails "String#<< concatenates the given argument to self and returns self"
37
16
  fails "String#<< converts the given argument to a String using to_str"
38
17
  fails "String#<< raises a RuntimeError when self is frozen"
@@ -60,17 +39,6 @@ opal_unsupported_filter "String" do
60
39
  fails "String#<< with Integer raises RangeError if the argument is negative"
61
40
  fails "String#<< with Integer raises a RuntimeError when self is frozen"
62
41
  fails "String#<< with Integer returns a ASCII-8BIT string if self is US-ASCII and the argument is between 128-255 (inclusive)"
63
- fails "String#<=> with String compares the indices of the encodings when the strings have identical non-ASCII-compatible bytes"
64
- fails "String#<=> with String ignores encoding difference"
65
- fails "String#<=> with String returns -1 if self is bytewise less than other"
66
- fails "String#<=> with String returns 0 with identical ASCII-compatible bytes of different encodings"
67
- fails "String#<=> with String returns 1 if self is bytewise greater than other"
68
- fails "String#== considers encoding compatibility"
69
- fails "String#== considers encoding difference of incompatible string"
70
- fails "String#== ignores encoding difference of compatible string"
71
- fails "String#=== considers encoding compatibility"
72
- fails "String#=== considers encoding difference of incompatible string"
73
- fails "String#=== ignores encoding difference of compatible string"
74
42
  fails "String#[] with Range always taints resulting strings when self is tainted"
75
43
  fails "String#[] with Regexp, index always taints resulting strings when self or regexp is tainted"
76
44
  fails "String#[] with String taints resulting strings when other is tainted"
@@ -100,6 +68,48 @@ opal_unsupported_filter "String" do
100
68
  fails "String#[]= with Fixnum index, count raises an IndexError if |idx| is greater than the length of the string"
101
69
  fails "String#[]= with Fixnum index, count starts at idx and overwrites count characters before inserting the rest of other_str"
102
70
  fails "String#[]= with Fixnum index, count taints self if other_str is tainted"
71
+ fails "String#[]= with Integer index allows assignment to the zero'th element of an empty String" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
72
+ fails "String#[]= with Integer index calls #to_int to convert the index" # Mock 'string element set' expected to receive to_int("any_args") exactly 1 times but received it 0 times
73
+ fails "String#[]= with Integer index calls #to_str to convert other to a String" # Mock '-test-' expected to receive to_str("any_args") exactly 1 times but received it 0 times
74
+ fails "String#[]= with Integer index calls to_int on index" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
75
+ fails "String#[]= with Integer index encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
76
+ fails "String#[]= with Integer index raises IndexError if the string index doesn't match a position in the string" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
77
+ fails "String#[]= with Integer index raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
78
+ fails "String#[]= with Integer index raises a TypeError if #to_int does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
79
+ fails "String#[]= with Integer index raises a TypeError if other_str can't be converted to a String" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
80
+ fails "String#[]= with Integer index raises a TypeError if passed an Integer replacement" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
81
+ fails "String#[]= with Integer index raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
82
+ fails "String#[]= with Integer index raises an IndexError if #to_int returns a value out of range" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
83
+ fails "String#[]= with Integer index raises an IndexError if the index is greater than character size" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
84
+ fails "String#[]= with Integer index raises an IndexError without changing self if idx is outside of self" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
85
+ fails "String#[]= with Integer index replaces a character with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
86
+ fails "String#[]= with Integer index replaces a multibyte character with a character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
87
+ fails "String#[]= with Integer index replaces a multibyte character with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
88
+ fails "String#[]= with Integer index replaces the char at idx with other_str" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
89
+ fails "String#[]= with Integer index taints self if other_str is tainted" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
90
+ fails "String#[]= with Integer index, count appends other_str to the end of the string if idx == the length of the string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
91
+ fails "String#[]= with Integer index, count calls #to_int to convert the index and count objects" # Mock 'string element set index' expected to receive to_int("any_args") exactly 1 times but received it 0 times
92
+ fails "String#[]= with Integer index, count calls #to_str to convert the replacement object" # Mock 'string element set replacement' expected to receive to_str("any_args") exactly 1 times but received it 0 times
93
+ fails "String#[]= with Integer index, count counts negative idx values from end of the string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
94
+ fails "String#[]= with Integer index, count deletes a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
95
+ fails "String#[]= with Integer index, count deletes characters if other_str is an empty string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
96
+ fails "String#[]= with Integer index, count deletes characters up to the maximum length of the existing string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
97
+ fails "String#[]= with Integer index, count encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
98
+ fails "String#[]= with Integer index, count inserts a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
99
+ fails "String#[]= with Integer index, count overwrites and deletes characters if count is more than the length of other_str" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
100
+ fails "String#[]= with Integer index, count raises a TypeError if #to_int for count does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
101
+ fails "String#[]= with Integer index, count raises a TypeError if #to_int for index does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
102
+ fails "String#[]= with Integer index, count raises a TypeError if other_str is a type other than String" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
103
+ fails "String#[]= with Integer index, count raises a TypeError of #to_str does not return a String" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
104
+ fails "String#[]= with Integer index, count raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
105
+ fails "String#[]= with Integer index, count raises an IndexError if count < 0" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
106
+ fails "String#[]= with Integer index, count raises an IndexError if the character index is out of range of a multibyte String" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
107
+ fails "String#[]= with Integer index, count raises an IndexError if |idx| is greater than the length of the string" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
108
+ fails "String#[]= with Integer index, count replaces characters with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
109
+ fails "String#[]= with Integer index, count replaces multibyte characters with characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
110
+ fails "String#[]= with Integer index, count replaces multibyte characters with multibyte characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
111
+ fails "String#[]= with Integer index, count starts at idx and overwrites count characters before inserting the rest of other_str" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
112
+ fails "String#[]= with Integer index, count taints self if other_str is tainted" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
103
113
  fails "String#[]= with String index raises an IndexError if the search String is not found"
104
114
  fails "String#[]= with String index replaces characters with no characters"
105
115
  fails "String#[]= with String index replaces fewer characters with more characters"
@@ -125,9 +135,9 @@ opal_unsupported_filter "String" do
125
135
  fails "String#[]= with a Regexp index with 3 arguments checks the match index before calling #to_str to convert the replacement"
126
136
  fails "String#[]= with a Regexp index with 3 arguments raises IndexError if the specified capture isn't available"
127
137
  fails "String#[]= with a Regexp index with 3 arguments raises a TypeError if #to_int does not return a Fixnum"
138
+ fails "String#[]= with a Regexp index with 3 arguments raises a TypeError if #to_int does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
128
139
  fails "String#[]= with a Regexp index with 3 arguments uses the 2nd of 3 arguments as which capture should be replaced"
129
140
  fails "String#[]= with a Regexp index with 3 arguments when the optional capture does not match raises an IndexError before setting the replacement"
130
- fails "String#capitalize is locale insensitive (only upcases a-z and only downcases A-Z)"
131
141
  fails "String#capitalize taints resulting string when self is tainted"
132
142
  fails "String#capitalize! capitalizes self in place for all of Unicode" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
133
143
  fails "String#capitalize! capitalizes self in place"
@@ -136,25 +146,26 @@ opal_unsupported_filter "String" do
136
146
  fails "String#capitalize! full Unicode case mapping modifies self in place for all of Unicode with no option" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
137
147
  fails "String#capitalize! full Unicode case mapping only capitalizes the first resulting character when upcasing a character produces a multi-character sequence" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
138
148
  fails "String#capitalize! full Unicode case mapping updates string metadata" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
149
+ fails "String#capitalize! full Unicode case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
139
150
  fails "String#capitalize! modifies self in place for ASCII-only case mapping does not capitalize non-ASCII characters" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
151
+ fails "String#capitalize! modifies self in place for ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
140
152
  fails "String#capitalize! modifies self in place for full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
141
153
  fails "String#capitalize! modifies self in place for full Unicode case mapping adapted for Lithuanian currently works the same as full Unicode case mapping" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
142
154
  fails "String#capitalize! modifies self in place for full Unicode case mapping adapted for Lithuanian does not allow any other additional option" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
143
155
  fails "String#capitalize! modifies self in place for full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
144
156
  fails "String#capitalize! modifies self in place for full Unicode case mapping adapted for Turkic languages capitalizes ASCII characters according to Turkic semantics" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
145
157
  fails "String#capitalize! modifies self in place for full Unicode case mapping adapted for Turkic languages does not allow any other additional option" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
158
+ fails "String#capitalize! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
146
159
  fails "String#capitalize! raises a RuntimeError when self is frozen"
147
160
  fails "String#capitalize! returns nil when no changes are made"
148
161
  fails "String#center with length, padding taints result when self or padstr is tainted"
149
162
  fails "String#center with length, padding when padding is tainted and self is untainted returns a tainted string if and only if length is longer than self"
150
- fails "String#chars is unicode aware"
151
163
  fails "String#chomp when passed '' taints the result if self is tainted"
152
164
  fails "String#chomp when passed '\\n' taints the result if self is tainted"
153
165
  fails "String#chomp when passed a String does not taint the result when the argument is tainted"
154
166
  fails "String#chomp when passed a String taints the result if self is tainted"
155
167
  fails "String#chomp when passed nil returns a copy of the String"
156
168
  fails "String#chomp when passed nil taints the result if self is tainted"
157
- fails "String#chomp when passed no argument returns a copy of the String when it is not modified"
158
169
  fails "String#chomp when passed no argument taints the result if self is tainted"
159
170
  fails "String#chomp! raises a RuntimeError on a frozen instance when it is modified"
160
171
  fails "String#chomp! raises a RuntimeError on a frozen instance when it would not be modified"
@@ -192,6 +203,7 @@ opal_unsupported_filter "String" do
192
203
  fails "String#chomp! when passed no argument returns nil when self is empty"
193
204
  fails "String#chomp! when passed no argument returns subclass instances when called on a subclass"
194
205
  fails "String#chomp! when passed no argument taints the result if self is tainted"
206
+ fails "String#chop removes the final carriage return, newline from a non-ASCII String"
195
207
  fails "String#chop returns a new string when applied to an empty string"
196
208
  fails "String#chop taints result when self is tainted"
197
209
  fails "String#chop untrusts result when self is untrusted"
@@ -263,6 +275,7 @@ opal_unsupported_filter "String" do
263
275
  fails "String#downcase is locale insensitive (only replaces A-Z)"
264
276
  fails "String#downcase taints result when self is tainted"
265
277
  fails "String#downcase! ASCII-only case mapping does not downcase non-ASCII characters" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
278
+ fails "String#downcase! ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
266
279
  fails "String#downcase! case folding case folds special characters" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
267
280
  fails "String#downcase! does not allow invalid options" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
268
281
  fails "String#downcase! full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
@@ -274,6 +287,7 @@ opal_unsupported_filter "String" do
274
287
  fails "String#downcase! full Unicode case mapping modifies self in place for all of Unicode with no option" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
275
288
  fails "String#downcase! full Unicode case mapping updates string metadata" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
276
289
  fails "String#downcase! modifies self in place for all of Unicode" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
290
+ fails "String#downcase! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
277
291
  fails "String#downcase! modifies self in place"
278
292
  fails "String#downcase! raises a RuntimeError when self is frozen"
279
293
  fails "String#downcase! returns nil if no modifications were made"
@@ -330,23 +344,12 @@ opal_unsupported_filter "String" do
330
344
  fails "String#encode! when passed to, options calls #to_hash to convert the options object" # NoMethodError: undefined method `default_internal' for Encoding
331
345
  fails "String#encode! when passed to, options replaces invalid characters in the destination encoding" # NoMethodError: undefined method `default_internal' for Encoding
332
346
  fails "String#encode! when passed to, options replaces undefined characters in the destination encoding" # NoMethodError: undefined method `default_internal' for Encoding
333
- fails "String#eql? considers encoding compatibility"
334
- fails "String#eql? considers encoding difference of incompatible string"
335
- fails "String#eql? ignores encoding difference of compatible string"
336
- fails "String#gsub with pattern and Hash ignores non-String keys"
347
+ fails "String#gsub with pattern and Hash ignores non-String keys" # Expected "tazoo" == "taboo" to be truthy but was false
337
348
  fails "String#gsub with pattern and Hash taints the result if a hash value is tainted"
338
349
  fails "String#gsub with pattern and Hash taints the result if the original string is tainted"
339
350
  fails "String#gsub with pattern and Hash untrusts the result if a hash value is untrusted"
340
351
  fails "String#gsub with pattern and Hash untrusts the result if the original string is untrusted"
341
- fails "String#gsub with pattern and block raises an ArgumentError if encoding is not valid"
342
- fails "String#gsub with pattern and block raises an Encoding::CompatibilityError if the encodings are not compatible"
343
- fails "String#gsub with pattern and block replaces the incompatible part properly even if the encodings are not compatible"
344
352
  fails "String#gsub with pattern and block untrusts the result if the original string or replacement is untrusted"
345
- fails "String#gsub with pattern and block uses the compatible encoding if they are compatible"
346
- fails "String#gsub with pattern and replacement doesn't freak out when replacing ^" #Only fails "Text\nFoo".gsub(/^/, ' ').should == " Text\n Foo"
347
- fails "String#gsub with pattern and replacement replaces \\k named backreferences with the regexp's corresponding capture"
348
- fails "String#gsub with pattern and replacement returns a copy of self with all occurrences of pattern replaced with replacement" #Only fails str.gsub(/\Ah\S+\s*/, "huh? ").should == "huh? homely world. hah!"
349
- fails "String#gsub with pattern and replacement supports \\G which matches at the beginning of the remaining (non-matched) string"
350
353
  fails "String#gsub with pattern and replacement taints the result if the original string or replacement is tainted"
351
354
  fails "String#gsub with pattern and replacement untrusts the result if the original string or replacement is untrusted"
352
355
  fails "String#gsub! with pattern and Hash coerces the hash values with #to_s"
@@ -404,8 +407,6 @@ opal_unsupported_filter "String" do
404
407
  fails "String#insert with index, other raises a TypeError if other can't be converted to string"
405
408
  fails "String#insert with index, other raises an IndexError if the index is beyond string"
406
409
  fails "String#insert with index, other taints self if string to insert is tainted"
407
- fails "String#inspect returns a string with a NUL character replaced by \\x notation"
408
- fails "String#inspect returns a string with non-printing characters replaced by \\x notation"
409
410
  fails "String#inspect taints the result if self is tainted"
410
411
  fails "String#inspect untrusts the result if self is untrusted"
411
412
  fails "String#lines does not care if the string is modified while substituting"
@@ -491,6 +492,7 @@ opal_unsupported_filter "String" do
491
492
  fails "String#slice! Range deletes and return the substring given by the offsets of the range"
492
493
  fails "String#slice! Range raises a RuntimeError on a frozen instance that is modified"
493
494
  fails "String#slice! Range raises a RuntimeError on a frozen instance that would not be modified"
495
+ fails "String#slice! Range returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
494
496
  fails "String#slice! Range returns nil if the given range is out of self"
495
497
  fails "String#slice! Range returns subclass instances"
496
498
  fails "String#slice! Range returns the substring given by the character offsets of the range" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
@@ -500,6 +502,7 @@ opal_unsupported_filter "String" do
500
502
  fails "String#slice! with Regexp doesn't taint self when regexp is tainted"
501
503
  fails "String#slice! with Regexp raises a RuntimeError on a frozen instance that is modified"
502
504
  fails "String#slice! with Regexp raises a RuntimeError on a frozen instance that would not be modified"
505
+ fails "String#slice! with Regexp returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
503
506
  fails "String#slice! with Regexp returns nil if there was no match"
504
507
  fails "String#slice! with Regexp returns subclass instances"
505
508
  fails "String#slice! with Regexp returns the matching portion of self with a multi byte character" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
@@ -510,6 +513,7 @@ opal_unsupported_filter "String" do
510
513
  fails "String#slice! with Regexp, index deletes and returns the capture for idx from self"
511
514
  fails "String#slice! with Regexp, index doesn't taint self when regexp is tainted"
512
515
  fails "String#slice! with Regexp, index raises a RuntimeError if self is frozen"
516
+ fails "String#slice! with Regexp, index returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
513
517
  fails "String#slice! with Regexp, index returns nil if there is no capture for idx"
514
518
  fails "String#slice! with Regexp, index returns nil if there was no match"
515
519
  fails "String#slice! with Regexp, index returns subclass instances"
@@ -531,15 +535,12 @@ opal_unsupported_filter "String" do
531
535
  fails "String#slice! with index, length calls to_int on idx and length"
532
536
  fails "String#slice! with index, length deletes and returns the substring at idx and the given length"
533
537
  fails "String#slice! with index, length raises a RuntimeError if self is frozen"
538
+ fails "String#slice! with index, length returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
534
539
  fails "String#slice! with index, length returns nil if the length is negative"
535
540
  fails "String#slice! with index, length returns subclass instances"
536
541
  fails "String#slice! with index, length returns the substring given by the character offsets" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
537
542
  fails "String#slice! with index, length treats invalid bytes as single bytes" # NoMethodError: undefined method `pack' for [230, 203]:Array
538
543
  fails "String#split with Regexp doesn't taints the resulting strings if the Regexp is tainted"
539
- fails "String#split with Regexp respects the encoding of the regexp when splitting between characters"
540
- fails "String#split with Regexp retains the encoding of the source string"
541
- fails "String#split with Regexp returns an ArgumentError if an invalid UTF-8 string is supplied"
542
- fails "String#split with Regexp splits a string on each character for a multibyte encoding and empty split"
543
544
  fails "String#split with Regexp taints an empty string if self is tainted"
544
545
  fails "String#split with Regexp taints the resulting strings if self is tainted"
545
546
  fails "String#split with String taints the resulting strings if self is tainted"
@@ -554,15 +555,14 @@ opal_unsupported_filter "String" do
554
555
  fails "String#strip! raises a RuntimeError on a frozen instance that is modified"
555
556
  fails "String#strip! raises a RuntimeError on a frozen instance that would not be modified"
556
557
  fails "String#strip! returns nil if no modifications where made"
557
- fails "String#sub with pattern and Hash ignores non-String keys"
558
+ fails "String#sub with pattern and Hash ignores non-String keys" # Expected "tazoo" == "taboo" to be truthy but was false
558
559
  fails "String#sub with pattern and Hash taints the result if a hash value is tainted"
559
560
  fails "String#sub with pattern and Hash taints the result if the original string is tainted"
560
561
  fails "String#sub with pattern and Hash untrusts the result if a hash value is untrusted"
561
562
  fails "String#sub with pattern and Hash untrusts the result if the original string is untrusted"
562
- fails "String#sub with pattern and block doesn't raise a RuntimeError if the string is modified while substituting"
563
+ fails "String#sub with pattern and block doesn't raise a RuntimeError if the string is modified while substituting" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
563
564
  fails "String#sub with pattern and block taints the result if the original string or replacement is tainted"
564
565
  fails "String#sub with pattern, replacement raises a TypeError when pattern is a Symbol"
565
- fails "String#sub with pattern, replacement supports \\G which matches at the beginning of the string"
566
566
  fails "String#sub with pattern, replacement taints the result if the original string or replacement is tainted"
567
567
  fails "String#sub! with pattern and Hash coerces the hash values with #to_s"
568
568
  fails "String#sub! with pattern and Hash doesn't interpolate special sequences like \\1 for the block's return value"
@@ -599,49 +599,52 @@ opal_unsupported_filter "String" do
599
599
  fails "String#swapcase! full Unicode case mapping adapted for Lithuanian does not allow any other additional option" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
600
600
  fails "String#swapcase! full Unicode case mapping modifies self in place for all of Unicode with no option" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
601
601
  fails "String#swapcase! full Unicode case mapping updates string metadata" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
602
+ fails "String#swapcase! full Unicode case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
602
603
  fails "String#swapcase! modifies self in place for ASCII-only case mapping does not swapcase non-ASCII characters" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
604
+ fails "String#swapcase! modifies self in place for ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
603
605
  fails "String#swapcase! modifies self in place for all of Unicode" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
604
606
  fails "String#swapcase! modifies self in place for full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
605
607
  fails "String#swapcase! modifies self in place for full Unicode case mapping adapted for Turkic languages does not allow any other additional option" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
606
608
  fails "String#swapcase! modifies self in place for full Unicode case mapping adapted for Turkic languages swaps case of ASCII characters according to Turkic semantics" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
609
+ fails "String#swapcase! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
607
610
  fails "String#swapcase! modifies self in place"
608
611
  fails "String#swapcase! raises a RuntimeError when self is frozen"
609
612
  fails "String#swapcase! returns nil if no modifications were made"
610
- fails "String#to_i with bases parses a String in base 10"
611
- fails "String#to_i with bases parses a String in base 11"
612
- fails "String#to_i with bases parses a String in base 12"
613
- fails "String#to_i with bases parses a String in base 13"
614
- fails "String#to_i with bases parses a String in base 14"
615
- fails "String#to_i with bases parses a String in base 15"
616
- fails "String#to_i with bases parses a String in base 16"
617
- fails "String#to_i with bases parses a String in base 17"
618
- fails "String#to_i with bases parses a String in base 18"
619
- fails "String#to_i with bases parses a String in base 19"
620
- fails "String#to_i with bases parses a String in base 2"
621
- fails "String#to_i with bases parses a String in base 20"
622
- fails "String#to_i with bases parses a String in base 21"
623
- fails "String#to_i with bases parses a String in base 22"
624
- fails "String#to_i with bases parses a String in base 23"
625
- fails "String#to_i with bases parses a String in base 24"
626
- fails "String#to_i with bases parses a String in base 25"
627
- fails "String#to_i with bases parses a String in base 26"
628
- fails "String#to_i with bases parses a String in base 27"
629
- fails "String#to_i with bases parses a String in base 28"
630
- fails "String#to_i with bases parses a String in base 29"
631
- fails "String#to_i with bases parses a String in base 3"
632
- fails "String#to_i with bases parses a String in base 30"
633
- fails "String#to_i with bases parses a String in base 31"
634
- fails "String#to_i with bases parses a String in base 32"
635
- fails "String#to_i with bases parses a String in base 33"
636
- fails "String#to_i with bases parses a String in base 34"
637
- fails "String#to_i with bases parses a String in base 35"
638
- fails "String#to_i with bases parses a String in base 36"
639
- fails "String#to_i with bases parses a String in base 4"
640
- fails "String#to_i with bases parses a String in base 5"
641
- fails "String#to_i with bases parses a String in base 6"
642
- fails "String#to_i with bases parses a String in base 7"
643
- fails "String#to_i with bases parses a String in base 8"
644
- fails "String#to_i with bases parses a String in base 9"
613
+ fails "String#to_i with bases parses a String in base 10" # Expected "1.2345678901234567e+99" == "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" to be truthy but was false
614
+ fails "String#to_i with bases parses a String in base 11" # Expected "1234567890a1234720000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890a1234567890a1234567890a1234567890a1234567890a1234567890a1234567890a1234567890a1234567890a" to be truthy but was false
615
+ fails "String#to_i with bases parses a String in base 12" # Expected "1234567890ab121800000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890ab1234567890ab1234567890ab1234567890ab1234567890ab1234567890ab1234567890ab1234567890ab" to be truthy but was false
616
+ fails "String#to_i with bases parses a String in base 13" # Expected "1234567890abc110000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abc1234567890abc1234567890abc1234567890abc1234567890abc1234567890abc1234567890abc" to be truthy but was false
617
+ fails "String#to_i with bases parses a String in base 14" # Expected "1234567890abcdc00000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcd1234567890abcd1234567890abcd1234567890abcd1234567890abcd1234567890abcd1234567890abcd" to be truthy but was false
618
+ fails "String#to_i with bases parses a String in base 15" # Expected "1234567890abcd9000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcde1234567890abcde1234567890abcde1234567890abcde1234567890abcde1234567890abcde" to be truthy but was false
619
+ fails "String#to_i with bases parses a String in base 16" # Expected "1234567890abce0000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" to be truthy but was false
620
+ fails "String#to_i with bases parses a String in base 17" # Expected "1234567890abcg00000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefg1234567890abcdefg1234567890abcdefg1234567890abcdefg1234567890abcdefg" to be truthy but was false
621
+ fails "String#to_i with bases parses a String in base 18" # Expected "1234567890abc40000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefgh1234567890abcdefgh1234567890abcdefgh1234567890abcdefgh1234567890abcdefgh" to be truthy but was false
622
+ fails "String#to_i with bases parses a String in base 19" # Expected "1234567890abcc000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghi1234567890abcdefghi1234567890abcdefghi1234567890abcdefghi1234567890abcdefghi" to be truthy but was false
623
+ fails "String#to_i with bases parses a String in base 2" # Expected "1010101010101010101010101010101010101010101010101010100000000000000000000000000000000000000000000000" == "1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010" to be truthy but was false
624
+ fails "String#to_i with bases parses a String in base 20" # Expected "1234567890abcg00000000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij" to be truthy but was false
625
+ fails "String#to_i with bases parses a String in base 21" # Expected "1234567890abad0000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijk1234567890abcdefghijk1234567890abcdefghijk1234567890abcdefghijk" to be truthy but was false
626
+ fails "String#to_i with bases parses a String in base 22" # Expected "1234567890abg000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijkl1234567890abcdefghijkl1234567890abcdefghijkl1234567890abcdefghijkl" to be truthy but was false
627
+ fails "String#to_i with bases parses a String in base 23" # Expected "1234567890abk0000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklm1234567890abcdefghijklm1234567890abcdefghijklm1234567890abcdefghijklm" to be truthy but was false
628
+ fails "String#to_i with bases parses a String in base 24" # Expected "1234567890acg00000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmn1234567890abcdefghijklmn1234567890abcdefghijklmn1234567890abcdefghijklmn" to be truthy but was false
629
+ fails "String#to_i with bases parses a String in base 25" # Expected "1234567890ae3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmno1234567890abcdefghijklmno1234567890abcdefghijklmno1234567890abcdefghijklmno" to be truthy but was false
630
+ fails "String#to_i with bases parses a String in base 26" # Expected "1234567890aba00000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnop1234567890abcdefghijklmnop1234567890abcdefghijklmnop" to be truthy but was false
631
+ fails "String#to_i with bases parses a String in base 27" # Expected "1234567890aen00000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopq1234567890abcdefghijklmnopq1234567890abcdefghijklmnopq" to be truthy but was false
632
+ fails "String#to_i with bases parses a String in base 28" # Expected "1234567890a6o00000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqr1234567890abcdefghijklmnopqr1234567890abcdefghijklmnopqr" to be truthy but was false
633
+ fails "String#to_i with bases parses a String in base 29" # Expected "1234567890ab000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrs1234567890abcdefghijklmnopqrs1234567890abcdefghijklmnopqrs" to be truthy but was false
634
+ fails "String#to_i with bases parses a String in base 3" # Expected "120120120120120120120120120120121200000000000000000000000000000000000000000000000000000000000000000" == "120120120120120120120120120120120120120120120120120120120120120120120120120120120120120120120120120" to be truthy but was false
635
+ fails "String#to_i with bases parses a String in base 30" # Expected "1234567890a8000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrst1234567890abcdefghijklmnopqrst1234567890abcdefghijklmnopqrst" to be truthy but was false
636
+ fails "String#to_i with bases parses a String in base 31" # Expected "1234567890a7000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrstu1234567890abcdefghijklmnopqrstu1234567890abcdefghijklmnopqrstu" to be truthy but was false
637
+ fails "String#to_i with bases parses a String in base 32" # Expected "1234567890a8000000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrstuv1234567890abcdefghijklmnopqrstuv1234567890abcdefghijklmnopqrstuv" to be truthy but was false
638
+ fails "String#to_i with bases parses a String in base 33" # Expected "1234567890ah000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrstuvw1234567890abcdefghijklmnopqrstuvw1234567890abcdefghijklmnopqrstuvw" to be truthy but was false
639
+ fails "String#to_i with bases parses a String in base 34" # Expected "1234567890a400000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrstuvwx1234567890abcdefghijklmnopqrstuvwx" to be truthy but was false
640
+ fails "String#to_i with bases parses a String in base 35" # Expected "12345678908x0000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrstuvwxy1234567890abcdefghijklmnopqrstuvwxy" to be truthy but was false
641
+ fails "String#to_i with bases parses a String in base 36" # Expected "1234567890ao000000000000000000000000000000000000000000000000000000000000" == "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz" to be truthy but was false
642
+ fails "String#to_i with bases parses a String in base 4" # Expected "1230123012301230123012301230000000000000000000000000000000000000000000000000000000000000000000000000" == "1230123012301230123012301230123012301230123012301230123012301230123012301230123012301230123012301230" to be truthy but was false
643
+ fails "String#to_i with bases parses a String in base 5" # Expected "1234012340123401234012100000000000000000000000000000000000000000000000000000000000000000000000000000" == "1234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340" to be truthy but was false
644
+ fails "String#to_i with bases parses a String in base 6" # Expected "123450123450123450122400000000000000000000000000000000000000000000000000000000000000000000000000" == "123450123450123450123450123450123450123450123450123450123450123450123450123450123450123450123450" to be truthy but was false
645
+ fails "String#to_i with bases parses a String in base 7" # Expected "12345601234560123501000000000000000000000000000000000000000000000000000000000000000000000000000000" == "12345601234560123456012345601234560123456012345601234560123456012345601234560123456012345601234560" to be truthy but was false
646
+ fails "String#to_i with bases parses a String in base 8" # Expected "123456701234567012400000000000000000000000000000000000000000000000000000000000000000000000000000" == "123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670" to be truthy but was false
647
+ fails "String#to_i with bases parses a String in base 9" # Expected "123456780123456780000000000000000000000000000000000000000000000000000000000000000000000000000000000" == "123456780123456780123456780123456780123456780123456780123456780123456780123456780123456780123456780" to be truthy but was false
645
648
  fails "String#to_s taints the result when self is tainted"
646
649
  fails "String#to_str taints the result when self is tainted"
647
650
  fails "String#tr taints the result when self is tainted"
@@ -661,13 +664,14 @@ opal_unsupported_filter "String" do
661
664
  fails "String#unicode_normalize! normalizes code points and modifies the receiving string"
662
665
  fails "String#unicode_normalize! raises an ArgumentError if the specified form is invalid"
663
666
  fails "String#unicode_normalize! raises an Encoding::CompatibilityError if the string is not in an unicode encoding"
664
- fails "String#upcase is locale insensitive (only replaces a-z)"
665
667
  fails "String#upcase taints result when self is tainted"
666
668
  fails "String#upcase! does not allow invalid options" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
667
669
  fails "String#upcase! does not allow the :fold option for upcasing" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
668
670
  fails "String#upcase! full Unicode case mapping modifies self in place for all of Unicode with no option" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
669
671
  fails "String#upcase! full Unicode case mapping updates string metadata for self" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
672
+ fails "String#upcase! full Unicode case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
670
673
  fails "String#upcase! modifies self in place for ASCII-only case mapping does not upcase non-ASCII characters" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
674
+ fails "String#upcase! modifies self in place for ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
671
675
  fails "String#upcase! modifies self in place for all of Unicode" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
672
676
  fails "String#upcase! modifies self in place for full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
673
677
  fails "String#upcase! modifies self in place for full Unicode case mapping adapted for Lithuanian currently works the same as full Unicode case mapping" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
@@ -675,6 +679,7 @@ opal_unsupported_filter "String" do
675
679
  fails "String#upcase! modifies self in place for full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
676
680
  fails "String#upcase! modifies self in place for full Unicode case mapping adapted for Turkic languages does not allow any other additional option" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
677
681
  fails "String#upcase! modifies self in place for full Unicode case mapping adapted for Turkic languages upcases ASCII characters according to Turkic semantics" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
682
+ fails "String#upcase! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
678
683
  fails "String#upcase! modifies self in place"
679
684
  fails "String#upcase! raises a RuntimeError when self is frozen"
680
685
  fails "String#upcase! returns nil if no modifications were made"