opal 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +40 -9
- data/CHANGELOG.md +349 -0
- data/Gemfile +7 -8
- data/README.md +25 -3
- data/Rakefile +4 -2
- data/bin/opal +1 -1
- data/examples/rack/Gemfile +3 -0
- data/examples/rack/app/application.rb +13 -0
- data/examples/rack/app/user.rb +21 -0
- data/examples/rack/config.ru +7 -0
- data/examples/rack/index.html.erb +10 -0
- data/examples/sinatra/Gemfile +4 -0
- data/examples/sinatra/app/application.rb +7 -0
- data/examples/sinatra/config.ru +21 -0
- data/lib/mspec/opal/rake_task.rb +29 -8
- data/lib/mspec/opal/runner.rb +5 -4
- data/lib/opal.rb +1 -0
- data/lib/opal/builder.rb +0 -28
- data/lib/opal/cli.rb +0 -14
- data/lib/opal/compiler.rb +12 -11
- data/lib/opal/fragment.rb +8 -1
- data/lib/opal/nodes/array.rb +1 -1
- data/lib/opal/nodes/base.rb +4 -0
- data/lib/opal/nodes/call.rb +6 -2
- data/lib/opal/nodes/call_special.rb +1 -1
- data/lib/opal/nodes/class.rb +2 -2
- data/lib/opal/nodes/constants.rb +3 -1
- data/lib/opal/nodes/helpers.rb +23 -14
- data/lib/opal/nodes/if.rb +16 -9
- data/lib/opal/nodes/literal.rb +37 -5
- data/lib/opal/nodes/logic.rb +7 -1
- data/lib/opal/nodes/module.rb +2 -2
- data/lib/opal/nodes/scope.rb +13 -2
- data/lib/opal/nodes/top.rb +9 -0
- data/lib/opal/nodes/variables.rb +5 -2
- data/lib/opal/parser.rb +306 -71
- data/lib/opal/parser/grammar.rb +2667 -2775
- data/lib/opal/parser/grammar.y +177 -233
- data/lib/opal/parser/lexer.rb +511 -427
- data/lib/opal/parser/sexp.rb +15 -3
- data/lib/opal/source_map.rb +8 -4
- data/lib/opal/sprockets.rb +4 -0
- data/lib/opal/sprockets/cache_key_fix.rb +17 -0
- data/lib/opal/sprockets/environment.rb +21 -0
- data/lib/opal/sprockets/erb.rb +30 -0
- data/lib/opal/sprockets/processor.rb +127 -0
- data/lib/opal/sprockets/server.rb +166 -0
- data/lib/opal/util.rb +29 -0
- data/lib/opal/version.rb +1 -1
- data/opal.gemspec +1 -1
- data/opal/corelib/array.rb +106 -187
- data/opal/corelib/array/inheritance.rb +113 -0
- data/opal/corelib/basic_object.rb +6 -2
- data/opal/corelib/boolean.rb +4 -0
- data/opal/corelib/class.rb +2 -0
- data/opal/corelib/complex.rb +3 -0
- data/opal/corelib/enumerable.rb +75 -8
- data/opal/corelib/enumerator.rb +2 -0
- data/opal/corelib/error.rb +23 -23
- data/opal/corelib/hash.rb +5 -5
- data/opal/corelib/helpers.rb +51 -16
- data/opal/corelib/io.rb +7 -24
- data/opal/corelib/kernel.rb +23 -11
- data/opal/corelib/module.rb +44 -47
- data/opal/corelib/nil_class.rb +4 -0
- data/opal/corelib/numeric.rb +101 -15
- data/opal/corelib/range.rb +2 -0
- data/opal/corelib/rational.rb +3 -0
- data/opal/corelib/regexp.rb +36 -17
- data/opal/corelib/runtime.js +22 -7
- data/opal/corelib/string.rb +213 -110
- data/opal/corelib/string/inheritance.rb +78 -0
- data/opal/corelib/struct.rb +8 -0
- data/opal/corelib/time.rb +54 -42
- data/opal/corelib/variables.rb +24 -0
- data/opal/opal.rb +5 -27
- data/spec/cli/compiler_spec.rb +136 -0
- data/spec/cli/dependency_resolver_spec.rb +40 -0
- data/spec/cli/lexer_spec.rb +110 -0
- data/spec/cli/parser/alias_spec.rb +26 -0
- data/spec/cli/parser/and_spec.rb +13 -0
- data/spec/cli/parser/attrasgn_spec.rb +28 -0
- data/spec/cli/parser/begin_spec.rb +42 -0
- data/spec/cli/parser/block_spec.rb +12 -0
- data/spec/cli/parser/break_spec.rb +17 -0
- data/spec/cli/parser/call_spec.rb +139 -0
- data/spec/cli/parser/class_spec.rb +35 -0
- data/spec/cli/parser/comments_spec.rb +11 -0
- data/spec/cli/parser/def_spec.rb +61 -0
- data/spec/cli/parser/if_spec.rb +26 -0
- data/spec/cli/parser/iter_spec.rb +59 -0
- data/spec/cli/parser/lambda_spec.rb +64 -0
- data/spec/cli/parser/literal_spec.rb +113 -0
- data/spec/cli/parser/masgn_spec.rb +37 -0
- data/spec/cli/parser/module_spec.rb +27 -0
- data/spec/cli/parser/not_spec.rb +27 -0
- data/spec/cli/parser/op_asgn1_spec.rb +23 -0
- data/spec/cli/parser/op_asgn2_spec.rb +23 -0
- data/spec/cli/parser/or_spec.rb +13 -0
- data/spec/cli/parser/return_spec.rb +17 -0
- data/spec/cli/parser/sclass_spec.rb +21 -0
- data/spec/cli/parser/string_spec.rb +269 -0
- data/spec/cli/parser/super_spec.rb +20 -0
- data/spec/cli/parser/undef_spec.rb +15 -0
- data/spec/cli/parser/unless_spec.rb +13 -0
- data/spec/cli/parser/variables_spec.rb +92 -0
- data/spec/cli/parser/while_spec.rb +15 -0
- data/spec/cli/parser/yield_spec.rb +20 -0
- data/spec/cli/spec_helper.rb +31 -11
- data/spec/opal/core/array/set_range_to_array_spec.rb +7 -0
- data/spec/opal/core/date_spec.rb +122 -0
- data/spec/opal/core/language/predefined_spec.rb +1 -1
- data/spec/opal/core/runtime/operator_call_spec.rb +13 -0
- data/spec/opal/core/runtime/truthy_spec.rb +23 -0
- data/spec/opal/filters/bugs/array.rb +96 -87
- data/spec/opal/filters/bugs/basic_object.rb +9 -0
- data/spec/opal/filters/bugs/class.rb +16 -0
- data/spec/opal/filters/bugs/enumerable.rb +54 -0
- data/spec/opal/filters/bugs/language.rb +37 -3
- data/spec/opal/filters/bugs/math.rb +93 -0
- data/spec/opal/filters/bugs/nil.rb +7 -0
- data/spec/opal/filters/bugs/numeric.rb +19 -0
- data/spec/opal/filters/bugs/opal.rb +12 -0
- data/spec/opal/filters/bugs/regexp.rb +0 -2
- data/spec/opal/filters/bugs/string.rb +317 -19
- data/spec/opal/filters/bugs/struct.rb +29 -0
- data/spec/opal/filters/bugs/time.rb +130 -9
- data/spec/opal/filters/unsupported/encoding.rb +52 -4
- data/spec/opal/filters/unsupported/enumerator.rb +0 -3
- data/spec/opal/filters/unsupported/integer_size.rb +7 -0
- data/spec/opal/filters/unsupported/method_added.rb +10 -0
- data/spec/opal/filters/unsupported/mutable_strings.rb +299 -1
- data/spec/opal/filters/unsupported/private_constants.rb +30 -0
- data/spec/opal/filters/unsupported/private_methods.rb +16 -0
- data/spec/opal/filters/unsupported/random.rb +4 -0
- data/spec/opal/filters/unsupported/tainted.rb +53 -0
- data/spec/opal/filters/unsupported/trusted.rb +5 -0
- data/spec/opal/rubyspecs +167 -234
- data/spec/opal/spec_helper.rb +3 -0
- data/spec/opal/stdlib/promise/error_spec.rb +15 -0
- data/spec/opal/stdlib/promise/rescue_spec.rb +35 -0
- data/spec/opal/stdlib/promise/then_spec.rb +54 -0
- data/spec/opal/stdlib/promise/trace_spec.rb +35 -0
- data/spec/opal/stdlib/promise/value_spec.rb +15 -0
- data/spec/opal/stdlib/promise/when_spec.rb +34 -0
- data/stdlib/base64.rb +152 -0
- data/stdlib/date.rb +82 -49
- data/{opal/corelib → stdlib}/encoding.rb +3 -1
- data/stdlib/erb.rb +0 -1
- data/stdlib/json.rb +10 -26
- data/stdlib/math.rb +370 -0
- data/stdlib/native.rb +40 -33
- data/stdlib/opal-parser.rb +7 -4
- data/stdlib/promise.rb +292 -0
- data/stdlib/strscan.rb +1 -1
- data/stdlib/template.rb +1 -3
- data/stdlib/time.rb +9 -0
- metadata +143 -204
- data/doc/compiler.md +0 -42
- data/doc/compiler_options.md +0 -5
- data/doc/examples/node_http_server.rb +0 -49
- data/doc/external_libraries.md +0 -9
- data/doc/generated_javascript.md +0 -272
- data/doc/home.md +0 -17
- data/doc/method_missing.md +0 -58
- data/doc/static_applications.md +0 -60
- data/doc/using_ruby_from_javascript.md +0 -18
- data/doc/using_sprockets.md +0 -65
- data/spec/opal/core/numeric/abs_spec.rb +0 -12
- data/spec/opal/core/numeric/downto_spec.rb +0 -19
- data/spec/opal/core/numeric/equal_value_spec.rb +0 -9
- data/spec/opal/core/numeric/even_spec.rb +0 -21
- data/spec/opal/core/numeric/magnitude_spec.rb +0 -12
- data/spec/opal/core/numeric/odd_spec.rb +0 -21
- data/spec/opal/core/string/chop_spec.rb +0 -10
- data/spec/opal/core/string/chr_spec.rb +0 -13
- data/spec/opal/core/string/clone_spec.rb +0 -8
- data/spec/opal/core/string/comparison_spec.rb +0 -13
- data/spec/opal/core/string/dup_spec.rb +0 -8
- data/spec/opal/core/string/element_reference_spec.rb +0 -96
- data/spec/opal/core/string/fixtures/classes.rb +0 -49
- data/spec/opal/core/string/format_spec.rb +0 -9
- data/spec/opal/core/string/freeze_spec.rb +0 -15
- data/spec/opal/core/string/gsub_spec.rb +0 -31
- data/spec/opal/core/string/lines_spec.rb +0 -9
- data/spec/opal/core/string/ljust_spec.rb +0 -32
- data/spec/opal/core/string/lstrip_spec.rb +0 -7
- data/spec/opal/core/string/match_spec.rb +0 -49
- data/spec/opal/core/string/next_spec.rb +0 -10
- data/spec/opal/core/string/ord_spec.rb +0 -9
- data/spec/opal/core/string/partition_spec.rb +0 -10
- data/spec/opal/core/string/rindex_spec.rb +0 -50
- data/spec/opal/core/string/rjust_spec.rb +0 -32
- data/spec/opal/core/string/rstrip_spec.rb +0 -7
- data/spec/opal/core/string/scan_spec.rb +0 -66
- data/spec/opal/core/string/slice_spec.rb +0 -74
- data/spec/opal/core/string/split_spec.rb +0 -5
- data/spec/opal/core/string/strip_spec.rb +0 -6
- data/spec/opal/core/string/sub_spec.rb +0 -38
- data/spec/opal/core/string/succ_spec.rb +0 -10
- data/spec/opal/core/string/sum_spec.rb +0 -5
- data/spec/opal/core/string/to_f_spec.rb +0 -14
- data/spec/opal/core/string/to_i_spec.rb +0 -25
- data/spec/opal/core/string/tr_s_spec.rb +0 -31
- data/spec/opal/core/string/tr_spec.rb +0 -31
- data/spec/opal/filters/bugs/parser.rb +0 -10
- data/spec/opal/filters/unsupported/immutable_strings.rb +0 -24
- data/spec/opal/filters/unsupported/string_subclasses.rb +0 -8
- data/spec/opal/parser/alias_spec.rb +0 -26
- data/spec/opal/parser/and_spec.rb +0 -13
- data/spec/opal/parser/array_spec.rb +0 -22
- data/spec/opal/parser/attrasgn_spec.rb +0 -28
- data/spec/opal/parser/begin_spec.rb +0 -42
- data/spec/opal/parser/block_spec.rb +0 -12
- data/spec/opal/parser/break_spec.rb +0 -17
- data/spec/opal/parser/call_spec.rb +0 -131
- data/spec/opal/parser/class_spec.rb +0 -35
- data/spec/opal/parser/const_spec.rb +0 -13
- data/spec/opal/parser/cvar_spec.rb +0 -11
- data/spec/opal/parser/def_spec.rb +0 -61
- data/spec/opal/parser/false_spec.rb +0 -17
- data/spec/opal/parser/file_spec.rb +0 -7
- data/spec/opal/parser/gvar_spec.rb +0 -13
- data/spec/opal/parser/hash_spec.rb +0 -17
- data/spec/opal/parser/heredoc_spec.rb +0 -30
- data/spec/opal/parser/iasgn_spec.rb +0 -9
- data/spec/opal/parser/if_spec.rb +0 -26
- data/spec/opal/parser/int_spec.rb +0 -13
- data/spec/opal/parser/iter_spec.rb +0 -59
- data/spec/opal/parser/ivar_spec.rb +0 -9
- data/spec/opal/parser/lambda_spec.rb +0 -64
- data/spec/opal/parser/lasgn_spec.rb +0 -8
- data/spec/opal/parser/line_spec.rb +0 -8
- data/spec/opal/parser/lvar_spec.rb +0 -38
- data/spec/opal/parser/masgn_spec.rb +0 -37
- data/spec/opal/parser/module_spec.rb +0 -27
- data/spec/opal/parser/nil_spec.rb +0 -17
- data/spec/opal/parser/not_spec.rb +0 -27
- data/spec/opal/parser/nth_ref_spec.rb +0 -13
- data/spec/opal/parser/op_asgn1_spec.rb +0 -23
- data/spec/opal/parser/op_asgn2_spec.rb +0 -23
- data/spec/opal/parser/or_spec.rb +0 -13
- data/spec/opal/parser/parse_spec.rb +0 -66
- data/spec/opal/parser/regexp_spec.rb +0 -16
- data/spec/opal/parser/return_spec.rb +0 -17
- data/spec/opal/parser/sclass_spec.rb +0 -21
- data/spec/opal/parser/self_spec.rb +0 -17
- data/spec/opal/parser/str_spec.rb +0 -107
- data/spec/opal/parser/string_spec.rb +0 -8
- data/spec/opal/parser/super_spec.rb +0 -20
- data/spec/opal/parser/true_spec.rb +0 -17
- data/spec/opal/parser/undef_spec.rb +0 -15
- data/spec/opal/parser/unless_spec.rb +0 -13
- data/spec/opal/parser/while_spec.rb +0 -15
- data/spec/opal/parser/xstr_spec.rb +0 -116
- data/spec/opal/parser/yield_spec.rb +0 -20
@@ -1,5 +1,29 @@
|
|
1
1
|
opal_filter "Struct" do
|
2
|
+
fails "Struct#[] fails when it does not know about the requested attribute"
|
3
|
+
fails "Struct#[] fails if not passed a string, symbol, or integer"
|
4
|
+
|
5
|
+
fails "Struct#[]= fails when trying to assign attributes which don't exist"
|
6
|
+
|
7
|
+
fails "Struct#== returns true if the other has all the same fields"
|
8
|
+
fails "Struct#== handles recursive structures by returning false if a difference can be found "
|
9
|
+
|
10
|
+
fails "Struct#eql? returns false if any corresponding elements are not #eql?"
|
11
|
+
fails "Struct#eql? handles recursive structures by returning false if a difference can be found "
|
12
|
+
|
13
|
+
fails "Struct#hash returns the same fixnum for structs with the same content"
|
14
|
+
fails "Struct#hash returns the same value if structs are #eql?"
|
15
|
+
fails "Struct#hash returns the same hash for recursive structs"
|
16
|
+
|
17
|
+
fails "Struct#to_h returns a Hash with members as keys"
|
18
|
+
fails "Struct#to_h returns a Hash that is independent from the struct"
|
19
|
+
|
2
20
|
fails "Struct#initialize can be overriden"
|
21
|
+
|
22
|
+
fails "Struct#inspect returns a string representation of some kind"
|
23
|
+
|
24
|
+
fails "Struct#instance_variables returns an array with one name if an instance variable is added"
|
25
|
+
fails "Struct#instance_variables returns an empty array if only attributes are defined"
|
26
|
+
|
3
27
|
fails "Struct.new fails with too many arguments"
|
4
28
|
fails "Struct.new creates a constant in subclass' namespace"
|
5
29
|
fails "Struct.new raises a TypeError if object is not a Symbol"
|
@@ -8,4 +32,9 @@ opal_filter "Struct" do
|
|
8
32
|
fails "Struct.new does not create a constant with symbol as first argument"
|
9
33
|
fails "Struct.new creates a new anonymous class with nil first argument"
|
10
34
|
fails "Struct.new calls to_str on its first argument (constant name)"
|
35
|
+
|
36
|
+
fails "Struct#values_at fails when passed unsupported types"
|
37
|
+
fails "Struct#values_at returns an array of values"
|
38
|
+
|
39
|
+
fails "Struct anonymous class instance methods Enumerable methods should work"
|
11
40
|
end
|
@@ -1,4 +1,84 @@
|
|
1
1
|
opal_filter "Time" do
|
2
|
+
fails "Time.at passed [Time, Integer] raises a TypeError"
|
3
|
+
fails "Time.at passed [Integer, String] raises a TypeError"
|
4
|
+
fails "Time.at passed [Integer, nil] raises a TypeError"
|
5
|
+
fails "Time.at with a second argument that responds to #to_r coerces using #to_r"
|
6
|
+
fails "Time.at with a second argument that responds to #to_int coerces using #to_int"
|
7
|
+
fails "Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Float microseconds since 1971-01-01 00:00:00 UTC"
|
8
|
+
fails "Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Integer microseconds since 1970-01-01 00:00:00 UTC"
|
9
|
+
fails "Time.at passed non-Time, non-Numeric with an argument that responds to #to_r coerces using #to_r"
|
10
|
+
fails "Time.at passed non-Time, non-Numeric with an argument that responds to #to_int coerces using #to_int"
|
11
|
+
fails "Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Float microseconds since 1970-01-01 00:00:00 UTC"
|
12
|
+
fails "Time.at passed non-Time, non-Numeric raises a TypeError with a nil argument"
|
13
|
+
fails "Time.at passed non-Time, non-Numeric raises a TypeError with a String argument"
|
14
|
+
fails "Time.at passed Time returns a subclass instance"
|
15
|
+
fails "Time.at passed Time returns a UTC time if the argument is UTC"
|
16
|
+
fails "Time.at passed Time creates a new time object with the value given by time"
|
17
|
+
fails "Time.at passed Numeric returns a subclass instance on a Time subclass"
|
18
|
+
fails "Time.at passed Numeric returns a Time object representing the given number of Float seconds since 1970-01-01 00:00:00 UTC"
|
19
|
+
fails "Time.at passed Numeric returns a Time object representing the given number of Integer seconds since 1970-01-01 00:00:00 UTC"
|
20
|
+
|
21
|
+
fails "Time#getgm returns a new time which is the utc representation of time"
|
22
|
+
|
23
|
+
fails "Time.gm ignores fractional seconds if a passed fractional number of microseconds"
|
24
|
+
fails "Time.gm ignores fractional seconds if a passed whole number of microseconds"
|
25
|
+
fails "Time.gm handles fractional microseconds as a Rational"
|
26
|
+
fails "Time.gm handles fractional microseconds as a Float"
|
27
|
+
fails "Time.gm handles microseconds"
|
28
|
+
fails "Time.gm handles float arguments"
|
29
|
+
fails "Time.gm handles string arguments"
|
30
|
+
fails "Time.gm returns subclass instances"
|
31
|
+
fails "Time.gm raises ArgumentError when given 11 arguments"
|
32
|
+
fails "Time.gm raises ArgumentError when given 9 arguments"
|
33
|
+
fails "Time.gm handles fractional seconds as a Rational"
|
34
|
+
fails "Time.gm handles fractional seconds as a Float"
|
35
|
+
fails "Time.gm coerces the second with #to_int"
|
36
|
+
fails "Time.gm coerces the minute with #to_int"
|
37
|
+
fails "Time.gm coerces the hour with #to_int"
|
38
|
+
fails "Time.gm coerces the day with #to_int"
|
39
|
+
fails "Time.gm coerces the month with #to_int"
|
40
|
+
fails "Time.gm coerces the month with #to_str"
|
41
|
+
fails "Time.gm handles a String month given as a short month name"
|
42
|
+
fails "Time.gm coerces the year with #to_int"
|
43
|
+
fails "Time.gm accepts nil month, day, hour, minute, and second"
|
44
|
+
fails "Time.gm creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)"
|
45
|
+
fails "Time.gm creates a time based on given values, interpreted as UTC (GMT)"
|
46
|
+
|
47
|
+
fails "Time#gmt_offset given negative offset returns a negative offset"
|
48
|
+
fails "Time#gmt_offset given positive offset returns a positive offset"
|
49
|
+
fails "Time#gmt_offset returns offset as Rational"
|
50
|
+
fails "Time#gmt_offset returns the correct offset for New Zealand around daylight savings time change"
|
51
|
+
fails "Time#gmt_offset returns the correct offset for Hawaii around daylight savings time change"
|
52
|
+
fails "Time#gmt_offset returns the correct offset for US Eastern time zone around daylight savings time change"
|
53
|
+
fails "Time#gmt_offset returns the offset in seconds between the timezone of time and UTC"
|
54
|
+
|
55
|
+
fails "Time.local ignores fractional seconds if a passed fractional number of microseconds"
|
56
|
+
fails "Time.local ignores fractional seconds if a passed whole number of microseconds"
|
57
|
+
fails "Time.local handles fractional microseconds as a Rational"
|
58
|
+
fails "Time.local handles fractional microseconds as a Float"
|
59
|
+
fails "Time.local handles microseconds"
|
60
|
+
fails "Time.local returns subclass instances"
|
61
|
+
fails "Time.local handles fractional seconds as a Rational"
|
62
|
+
fails "Time.local handles fractional seconds as a Float"
|
63
|
+
fails "Time.local coerces the month with #to_str"
|
64
|
+
fails "Time.local handles a String month given as a short month name"
|
65
|
+
fails "Time.local creates the correct time just after dst change"
|
66
|
+
fails "Time.local creates the correct time just before dst change"
|
67
|
+
fails "Time.local creates a time based on given C-style gmtime arguments, interpreted in the local time zone"
|
68
|
+
fails "Time.local respects rare old timezones"
|
69
|
+
fails "Time.local creates a time based on given values, interpreted in the local time zone"
|
70
|
+
|
71
|
+
fails "Time#- returns a time with the same fixed offset as self"
|
72
|
+
fails "Time#- maintains subseconds precision"
|
73
|
+
fails "Time#- maintains nanoseconds precision"
|
74
|
+
fails "Time#- maintains microseconds precision"
|
75
|
+
fails "Time#- maintains precision"
|
76
|
+
fails "Time#- tracks nanoseconds"
|
77
|
+
fails "Time#- tracks microseconds"
|
78
|
+
fails "Time#- tracks microseconds"
|
79
|
+
fails "Time#- accepts arguments that can be coerced into Rational"
|
80
|
+
fails "Time#- understands negative subtractions"
|
81
|
+
|
2
82
|
fails "Time.mktime respects rare old timezones"
|
3
83
|
fails "Time.mktime creates a time based on given values, interpreted in the local time zone"
|
4
84
|
fails "Time.mktime creates the correct time just before dst change"
|
@@ -12,17 +92,58 @@ opal_filter "Time" do
|
|
12
92
|
fails "Time.mktime handles a String month given as a short month name"
|
13
93
|
fails "Time.mktime returns subclass instances"
|
14
94
|
|
15
|
-
fails "Time#
|
16
|
-
fails "Time#day returns the day of the month (1..n) for a local Time"
|
17
|
-
|
18
|
-
fails "Time#hour returns the hour of the day (0..23) for a local Time"
|
19
|
-
fails "Time#hour returns the hour of the day for a Time with a fixed offset"
|
95
|
+
fails "Time#eql? returns false if self and other have differing fractional microseconds"
|
20
96
|
|
21
|
-
fails "Time
|
22
|
-
fails "Time
|
97
|
+
fails "Time.inspect formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
|
98
|
+
fails "Time.inspect formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
|
23
99
|
|
24
|
-
fails "Time
|
25
|
-
fails "Time
|
100
|
+
fails "Time#+ maintains subseconds precision"
|
101
|
+
fails "Time#+ maintains nanoseconds precision"
|
102
|
+
fails "Time#+ maintains microseconds precision"
|
103
|
+
fails "Time#+ maintains precision"
|
104
|
+
fails "Time#+ tracks nanoseconds"
|
105
|
+
fails "Time#+ tracks microseconds"
|
106
|
+
fails "Time#+ returns a time with the same fixed offset as self"
|
107
|
+
fails "Time#+ accepts arguments that can be coerced into Rational"
|
108
|
+
fails "Time#+ increments the time by the specified amount as rational numbers"
|
109
|
+
fails "Time#+ adds a negative Float"
|
110
|
+
fails "Time#+ is a commutative operator"
|
26
111
|
|
27
112
|
fails "Time#strftime supports week of year format with %U and %W"
|
113
|
+
|
114
|
+
fails "Time#to_s formats the local time following the pattern 'yyyy-MM-dd HH:mm:ss Z'"
|
115
|
+
fails "Time#to_s formats the fixed offset time following the pattern 'yyyy-MM-dd HH:mm:ss +/-HHMM'"
|
116
|
+
|
117
|
+
fails "Time#utc returns the utc representation of time"
|
118
|
+
fails "Time.utc ignores fractional seconds if a passed fractional number of microseconds"
|
119
|
+
fails "Time.utc ignores fractional seconds if a passed whole number of microseconds"
|
120
|
+
fails "Time.utc handles fractional microseconds as a Rational"
|
121
|
+
fails "Time.utc handles fractional microseconds as a Float"
|
122
|
+
fails "Time.utc handles microseconds"
|
123
|
+
fails "Time.utc handles float arguments"
|
124
|
+
fails "Time.utc handles string arguments"
|
125
|
+
fails "Time.utc returns subclass instances"
|
126
|
+
fails "Time.utc raises ArgumentError when given 11 arguments"
|
127
|
+
fails "Time.utc raises ArgumentError when given 9 arguments"
|
128
|
+
fails "Time.utc handles fractional seconds as a Rational"
|
129
|
+
fails "Time.utc handles fractional seconds as a Float"
|
130
|
+
fails "Time.utc coerces the second with #to_int"
|
131
|
+
fails "Time.utc coerces the minute with #to_int"
|
132
|
+
fails "Time.utc coerces the hour with #to_int"
|
133
|
+
fails "Time.utc coerces the day with #to_int"
|
134
|
+
fails "Time.utc coerces the month with #to_int"
|
135
|
+
fails "Time.utc coerces the month with #to_str"
|
136
|
+
fails "Time.utc handles a String month given as a short month name"
|
137
|
+
fails "Time.utc coerces the year with #to_int"
|
138
|
+
fails "Time.utc accepts nil month, day, hour, minute, and second"
|
139
|
+
fails "Time.utc creates a time based on given C-style gmtime arguments, interpreted as UTC (GMT)"
|
140
|
+
fails "Time.utc creates a time based on given values, interpreted as UTC (GMT)"
|
141
|
+
|
142
|
+
fails "Time#utc_offset given negative offset returns a negative offset"
|
143
|
+
fails "Time#utc_offset given positive offset returns a positive offset"
|
144
|
+
fails "Time#utc_offset returns offset as Rational"
|
145
|
+
fails "Time#utc_offset returns the correct offset for New Zealand around daylight savings time change"
|
146
|
+
fails "Time#utc_offset returns the correct offset for Hawaii around daylight savings time change"
|
147
|
+
fails "Time#utc_offset returns the correct offset for US Eastern time zone around daylight savings time change"
|
148
|
+
fails "Time#utc_offset returns the offset in seconds between the timezone of time and UTC"
|
28
149
|
end
|
@@ -3,12 +3,60 @@ opal_filter "Encoding" do
|
|
3
3
|
fails "Array#inspect use US-ASCII encoding if the default external encoding is not ascii compatible"
|
4
4
|
fails "Array#inspect use the default external encoding if it is ascii compatible"
|
5
5
|
fails "Array#inspect returns a US-ASCII string for an empty Array"
|
6
|
-
|
7
|
-
fails "Array#to_s use US-ASCII encoding if the default external encoding is not ascii compatible"
|
8
|
-
fails "Array#to_s use the default external encoding if it is ascii compatible"
|
9
|
-
fails "Array#to_s returns a US-ASCII string for an empty Array"
|
6
|
+
|
10
7
|
fails "Array#join fails for arrays with incompatibly-encoded strings"
|
11
8
|
fails "Array#join uses the widest common encoding when other strings are incompatible"
|
12
9
|
fails "Array#join uses the first encoding when other strings are compatible"
|
13
10
|
fails "Array#join returns a US-ASCII string for an empty Array"
|
11
|
+
|
12
|
+
fails "Array#to_s raises if inspected result is not default external encoding"
|
13
|
+
fails "Array#to_s use US-ASCII encoding if the default external encoding is not ascii compatible"
|
14
|
+
fails "Array#to_s use the default external encoding if it is ascii compatible"
|
15
|
+
fails "Array#to_s returns a US-ASCII string for an empty Array"
|
16
|
+
|
17
|
+
fails "String#<=> with String returns -1 if self is bytewise less than other"
|
18
|
+
fails "String#<=> with String returns 1 if self is bytewise greater than other"
|
19
|
+
fails "String#<=> with String returns 0 if self and other contain identical ASCII-compatible bytes in different encodings"
|
20
|
+
fails "String#<=> with String does not return 0 if self and other contain identical non-ASCII-compatible bytes in different encodings"
|
21
|
+
|
22
|
+
fails "String.allocate returns a fully-formed String"
|
23
|
+
fails "String.allocate returns a binary String"
|
24
|
+
|
25
|
+
fails "String#capitalize is locale insensitive (only upcases a-z and only downcases A-Z)"
|
26
|
+
|
27
|
+
fails "String#chars is unicode aware"
|
28
|
+
|
29
|
+
fails "String#downcase is locale insensitive (only replaces A-Z)"
|
30
|
+
|
31
|
+
fails "String#each_char is unicode aware"
|
32
|
+
|
33
|
+
fails "String#gsub with pattern and block uses the compatible encoding if they are compatible"
|
34
|
+
fails "String#gsub with pattern and block raises an Encoding::CompatibilityError if the encodings are not compatible"
|
35
|
+
fails "String#gsub with pattern and block replaces the incompatible part properly even if the encodings are not compatible"
|
36
|
+
|
37
|
+
fails "String#split with Regexp retains the encoding of the source string"
|
38
|
+
fails "String#split with Regexp returns an ArgumentError if an invalid UTF-8 string is supplied"
|
39
|
+
|
40
|
+
fails "String#upcase is locale insensitive (only replaces a-z)"
|
41
|
+
|
42
|
+
# language/magic_comment_spec
|
43
|
+
fails "Magic comment can take vim style"
|
44
|
+
fails "Magic comment can take Emacs style"
|
45
|
+
fails "Magic comment can be after the shebang"
|
46
|
+
fails "Magic comment must be the first token of the line"
|
47
|
+
fails "Magic comment must be at the first line"
|
48
|
+
fails "Magic comment is case-insensitive"
|
49
|
+
fails "Magic comment determines __ENCODING__"
|
50
|
+
end
|
51
|
+
|
52
|
+
opal_filter "Regexp.escape" do
|
53
|
+
fails "Regexp.escape sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String"
|
54
|
+
fails "Regexp.escape sets the encoding of the result to the encoding of the String if any non-US-ASCII characters are present in an input String with valid encoding"
|
55
|
+
fails "Regexp.escape sets the encoding of the result to ASCII-8BIT if any non-US-ASCII characters are present in an input String with invalid encoding"
|
56
|
+
end
|
57
|
+
|
58
|
+
opal_filter "Regexp.quote" do
|
59
|
+
fails "Regexp.quote sets the encoding of the result to US-ASCII if there are only US-ASCII characters present in the input String"
|
60
|
+
fails "Regexp.quote sets the encoding of the result to the encoding of the String if any non-US-ASCII characters are present in an input String with valid encoding"
|
61
|
+
fails "Regexp.quote sets the encoding of the result to ASCII-8BIT if any non-US-ASCII characters are present in an input String with invalid encoding"
|
14
62
|
end
|
@@ -10,7 +10,4 @@ opal_filter "Enumerator as generator" do
|
|
10
10
|
fails "Enumerator#rewind does nothing if the object doesn't have a #rewind method"
|
11
11
|
fails "Enumerator#rewind works with peek to reset the position"
|
12
12
|
fails "Enumerator#rewind calls the enclosed object's rewind method if one exists"
|
13
|
-
|
14
|
-
# 1.9.3 => 2.0
|
15
|
-
fails "Enumerator.new ignores block if arg given"
|
16
13
|
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
opal_filter "fixnum and array size" do
|
2
|
+
fails "Array#slice raises a RangeError when the length is out of range of Fixnum"
|
3
|
+
fails "Array#slice raises a RangeError when the start index is out of range of Fixnum"
|
4
|
+
fails "Array#fill with (filler, index, length) raises an ArgumentError or RangeError for too-large sizes"
|
5
|
+
fails "Array#[] raises a RangeError when the length is out of range of Fixnum"
|
6
|
+
fails "Array#[] raises a RangeError when the start index is out of range of Fixnum"
|
7
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
opal_filter "method_added" do
|
2
|
+
fails "BasicObject#singleton_method_undefined is called when a method is removed on self"
|
3
|
+
fails "BasicObject#singleton_method_undefined is a private method"
|
4
|
+
fails "BasicObject#singleton_method_removed is called when a method is removed on self"
|
5
|
+
fails "BasicObject#singleton_method_removed is a private method"
|
6
|
+
fails "BasicObject#singleton_method_added is called when define_method is used in the singleton class"
|
7
|
+
fails "BasicObject#singleton_method_added is called when a method is defined in the singleton class"
|
8
|
+
fails "BasicObject#singleton_method_added is called when a method is defined on self"
|
9
|
+
fails "BasicObject#singleton_method_added is a private method"
|
10
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
opal_filter "Mutable
|
1
|
+
opal_filter "Mutable strings are not supported in Opal" do
|
2
2
|
fails "String#upcase! raises a RuntimeError when self is frozen"
|
3
3
|
fails "String#upcase! returns nil if no modifications were made"
|
4
4
|
fails "String#upcase! modifies self in place"
|
@@ -46,4 +46,302 @@ opal_filter "Mutable Strings" do
|
|
46
46
|
fails "String#chomp! when passed no argument modifies self"
|
47
47
|
fails "String#chomp! raises a RuntimeError on a frozen instance when it would not be modified"
|
48
48
|
fails "String#chomp! raises a RuntimeError on a frozen instance when it is modified"
|
49
|
+
|
50
|
+
fails "Array#fill does not replicate the filler"
|
51
|
+
|
52
|
+
fails "Hash literal freezes string keys on initialization"
|
53
|
+
|
54
|
+
fails "Time#strftime formats time according to the directives in the given format string"
|
55
|
+
fails "Time#strftime with %z formats a local time with positive UTC offset as '+HHMM'"
|
56
|
+
fails "Time#strftime with %z formats a local time with negative UTC offset as '-HHMM'"
|
57
|
+
|
58
|
+
fails "String#<< concatenates the given argument to self and returns self"
|
59
|
+
fails "String#<< converts the given argument to a String using to_str"
|
60
|
+
fails "String#<< converts the given argument to a String using to_str"
|
61
|
+
fails "String#<< raises a TypeError if the given argument can't be converted to a String"
|
62
|
+
fails "String#<< raises a RuntimeError when self is frozen"
|
63
|
+
fails "String#<< works when given a subclass instance"
|
64
|
+
fails "String#<< taints self if other is tainted"
|
65
|
+
fails "String#<< untrusts self if other is untrusted"
|
66
|
+
fails "String#<< with Integer concatencates the argument interpreted as a codepoint"
|
67
|
+
fails "String#<< with Integer returns a ASCII-8BIT string if self is US-ASCII and the argument is between 128-255 (inclusive)"
|
68
|
+
fails "String#<< with Integer raises RangeError if the argument is an invalid codepoint for self's encoding"
|
69
|
+
fails "String#<< with Integer raises RangeError if the argument is negative"
|
70
|
+
fails "String#<< with Integer doesn't call to_int on its argument"
|
71
|
+
fails "String#<< with Integer raises a RuntimeError when self is frozen"
|
72
|
+
fails "String#<< when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses self's encoding if both are empty"
|
73
|
+
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"
|
74
|
+
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"
|
75
|
+
fails "String#<< when self is in an ASCII-incompatible encoding incompatible with the argument's encoding raises Encoding::CompatibilityError if neither are empty"
|
76
|
+
fails "String#<< when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses self's encoding if both are empty"
|
77
|
+
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"
|
78
|
+
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"
|
79
|
+
fails "String#<< when the argument is in an ASCII-incompatible encoding incompatible with self's encoding raises Encoding::CompatibilityError if neither are empty"
|
80
|
+
fails "String#<< when self and the argument are in different ASCII-compatible encodings uses self's encoding if both are ASCII-only"
|
81
|
+
fails "String#<< when self and the argument are in different ASCII-compatible encodings uses self's encoding if the argument is ASCII-only"
|
82
|
+
fails "String#<< when self and the argument are in different ASCII-compatible encodings uses the argument's encoding if self is ASCII-only"
|
83
|
+
fails "String#<< when self and the argument are in different ASCII-compatible encodings raises Encoding::CompatibilityError if neither are ASCII-only"
|
84
|
+
fails "String#<< when self is ASCII-8BIT and argument is US-ASCII uses ASCII-8BIT encoding"
|
85
|
+
|
86
|
+
fails "String#chomp when passed no argument returns a copy of the String when it is not modified"
|
87
|
+
|
88
|
+
fails "String#chop returns a new string when applied to an empty string"
|
89
|
+
|
90
|
+
fails "String#chop! removes the final character"
|
91
|
+
fails "String#chop! removes the final carriage return"
|
92
|
+
fails "String#chop! removes the final newline"
|
93
|
+
fails "String#chop! removes the final carriage return, newline"
|
94
|
+
fails "String#chop! removes the carrige return, newline if they are the only characters"
|
95
|
+
fails "String#chop! does not remove more than the final carriage return, newline"
|
96
|
+
fails "String#chop! returns self if modifications were made"
|
97
|
+
fails "String#chop! returns nil when called on an empty string"
|
98
|
+
fails "String#chop! raises a RuntimeError on a frozen instance that is modified"
|
99
|
+
fails "String#chop! raises a RuntimeError on a frozen instance that would not be modified"
|
100
|
+
|
101
|
+
fails "String#gsub! with pattern and Hash returns self with all occurrences of pattern replaced with the value of the corresponding hash key"
|
102
|
+
fails "String#gsub! with pattern and Hash ignores keys that don't correspond to matches"
|
103
|
+
fails "String#gsub! with pattern and Hash replaces self with an empty string if the pattern matches but the hash specifies no replacements"
|
104
|
+
fails "String#gsub! with pattern and Hash ignores non-String keys"
|
105
|
+
fails "String#gsub! with pattern and Hash uses a key's value as many times as needed"
|
106
|
+
fails "String#gsub! with pattern and Hash uses the hash's default value for missing keys"
|
107
|
+
fails "String#gsub! with pattern and Hash coerces the hash values with #to_s"
|
108
|
+
fails "String#gsub! with pattern and Hash coerces the hash values with #to_s"
|
109
|
+
fails "String#gsub! with pattern and Hash uses the hash's value set from default_proc for missing keys"
|
110
|
+
fails "String#gsub! with pattern and Hash sets $~ to MatchData of last match and nil when there's none for access from outside"
|
111
|
+
fails "String#gsub! with pattern and Hash doesn't interpolate special sequences like \\1 for the block's return value"
|
112
|
+
fails "String#gsub! with pattern and Hash keeps untrusted state"
|
113
|
+
fails "String#gsub! with pattern and Hash untrusts self if a hash value is untrusted"
|
114
|
+
fails "String#gsub! with pattern and Hash keeps tainted state"
|
115
|
+
fails "String#gsub! with pattern and Hash taints self if a hash value is tainted"
|
116
|
+
fails "String#gsub! with pattern and replacement modifies self in place and returns self"
|
117
|
+
fails "String#gsub! with pattern and replacement taints self if replacement is tainted"
|
118
|
+
fails "String#gsub! with pattern and replacement untrusts self if replacement is untrusted"
|
119
|
+
fails "String#gsub! with pattern and replacement returns nil if no modifications were made"
|
120
|
+
fails "String#gsub! with pattern and replacement raises a RuntimeError when self is frozen"
|
121
|
+
fails "String#gsub! with pattern and block modifies self in place and returns self"
|
122
|
+
fails "String#gsub! with pattern and block taints self if block's result is tainted"
|
123
|
+
fails "String#gsub! with pattern and block untrusts self if block's result is untrusted"
|
124
|
+
fails "String#gsub! with pattern and block returns nil if no modifications were made"
|
125
|
+
fails "String#gsub! with pattern and block raises a RuntimeError when self is frozen"
|
126
|
+
fails "String#gsub! with pattern and block uses the compatible encoding if they are compatible"
|
127
|
+
fails "String#gsub! with pattern and block raises an Encoding::CompatibilityError if the encodings are not compatible"
|
128
|
+
fails "String#gsub! with pattern and block replaces the incompatible part properly even if the encodings are not compatible"
|
129
|
+
|
130
|
+
fails "String#lstrip! modifies self in place and returns self"
|
131
|
+
fails "String#lstrip! returns nil if no modifications were made"
|
132
|
+
fails "String#lstrip! raises a RuntimeError on a frozen instance that is modified"
|
133
|
+
fails "String#lstrip! raises a RuntimeError on a frozen instance that would not be modified"
|
134
|
+
|
135
|
+
fails "String#next! is equivalent to succ, but modifies self in place (still returns self)"
|
136
|
+
fails "String#next! raises a RuntimeError if self is frozen"
|
137
|
+
|
138
|
+
fails "String#rstrip! modifies self in place and returns self"
|
139
|
+
fails "String#rstrip! modifies self removing trailing NULL bytes and whitespace"
|
140
|
+
fails "String#rstrip! returns nil if no modifications were made"
|
141
|
+
fails "String#rstrip! raises a RuntimeError on a frozen instance that is modified"
|
142
|
+
fails "String#rstrip! raises a RuntimeError on a frozen instance that would not be modified"
|
143
|
+
|
144
|
+
fails "String#slice! with index deletes and return the char at the given position"
|
145
|
+
fails "String#slice! with index returns nil if idx is outside of self"
|
146
|
+
fails "String#slice! with index raises a RuntimeError if self is frozen"
|
147
|
+
fails "String#slice! with index calls to_int on index"
|
148
|
+
fails "String#slice! with index, length deletes and returns the substring at idx and the given length"
|
149
|
+
fails "String#slice! with index, length always taints resulting strings when self is tainted"
|
150
|
+
fails "String#slice! with index, length returns nil if the length is negative"
|
151
|
+
fails "String#slice! with index, length raises a RuntimeError if self is frozen"
|
152
|
+
fails "String#slice! with index, length calls to_int on idx and length"
|
153
|
+
fails "String#slice! with index, length returns subclass instances"
|
154
|
+
fails "String#slice! Range deletes and return the substring given by the offsets of the range"
|
155
|
+
fails "String#slice! Range returns nil if the given range is out of self"
|
156
|
+
fails "String#slice! Range always taints resulting strings when self is tainted"
|
157
|
+
fails "String#slice! Range returns subclass instances"
|
158
|
+
fails "String#slice! Range calls to_int on range arguments"
|
159
|
+
fails "String#slice! Range works with Range subclasses"
|
160
|
+
fails "String#slice! Range raises a RuntimeError on a frozen instance that is modified"
|
161
|
+
fails "String#slice! Range raises a RuntimeError on a frozen instance that would not be modified"
|
162
|
+
fails "String#slice! with Regexp deletes and returns the first match from self"
|
163
|
+
fails "String#slice! with Regexp returns nil if there was no match"
|
164
|
+
fails "String#slice! with Regexp always taints resulting strings when self or regexp is tainted"
|
165
|
+
fails "String#slice! with Regexp doesn't taint self when regexp is tainted"
|
166
|
+
fails "String#slice! with Regexp returns subclass instances"
|
167
|
+
fails "String#slice! with Regexp sets $~ to MatchData when there is a match and nil when there's none"
|
168
|
+
fails "String#slice! with Regexp raises a RuntimeError on a frozen instance that is modified"
|
169
|
+
fails "String#slice! with Regexp raises a RuntimeError on a frozen instance that would not be modified"
|
170
|
+
fails "String#slice! with Regexp, index deletes and returns the capture for idx from self"
|
171
|
+
fails "String#slice! with Regexp, index always taints resulting strings when self or regexp is tainted"
|
172
|
+
fails "String#slice! with Regexp, index doesn't taint self when regexp is tainted"
|
173
|
+
fails "String#slice! with Regexp, index returns nil if there was no match"
|
174
|
+
fails "String#slice! with Regexp, index returns nil if there is no capture for idx"
|
175
|
+
fails "String#slice! with Regexp, index calls to_int on idx"
|
176
|
+
fails "String#slice! with Regexp, index returns subclass instances"
|
177
|
+
fails "String#slice! with Regexp, index sets $~ to MatchData when there is a match and nil when there's none"
|
178
|
+
fails "String#slice! with Regexp, index raises a RuntimeError if self is frozen"
|
179
|
+
fails "String#slice! with String removes and returns the first occurrence of other_str from self"
|
180
|
+
fails "String#slice! with String taints resulting strings when other is tainted"
|
181
|
+
fails "String#slice! with String doesn't set $~"
|
182
|
+
fails "String#slice! with String returns nil if self does not contain other"
|
183
|
+
fails "String#slice! with String doesn't call to_str on its argument"
|
184
|
+
fails "String#slice! with String returns a subclass instance when given a subclass instance"
|
185
|
+
fails "String#slice! with String raises a RuntimeError if self is frozen"
|
186
|
+
|
187
|
+
fails "String#[]= with Fixnum index replaces the char at idx with other_str"
|
188
|
+
fails "String#[]= with Fixnum index taints self if other_str is tainted"
|
189
|
+
fails "String#[]= with Fixnum index raises an IndexError without changing self if idx is outside of self"
|
190
|
+
fails "String#[]= with Fixnum index allows assignment to the zero'th element of an empty String"
|
191
|
+
fails "String#[]= with Fixnum index raises IndexError if the string index doesn't match a position in the string"
|
192
|
+
fails "String#[]= with Fixnum index raises a RuntimeError when self is frozen"
|
193
|
+
fails "String#[]= with Fixnum index calls to_int on index"
|
194
|
+
fails "String#[]= with Fixnum index calls #to_str to convert other to a String"
|
195
|
+
fails "String#[]= with Fixnum index raises a TypeError if other_str can't be converted to a String"
|
196
|
+
fails "String#[]= with String index replaces fewer characters with more characters"
|
197
|
+
fails "String#[]= with String index replaces more characters with fewer characters"
|
198
|
+
fails "String#[]= with String index replaces characters with no characters"
|
199
|
+
fails "String#[]= with String index raises an IndexError if the search String is not found"
|
200
|
+
fails "String#[]= with a Regexp index replaces the matched text with the rhs"
|
201
|
+
fails "String#[]= with a Regexp index raises IndexError if the regexp index doesn't match a position in the string"
|
202
|
+
fails "String#[]= with a Regexp index calls #to_str to convert the replacement"
|
203
|
+
fails "String#[]= with a Regexp index checks the match before calling #to_str to convert the replacement"
|
204
|
+
fails "String#[]= with a Regexp index with 3 arguments calls #to_int to convert the second object"
|
205
|
+
fails "String#[]= with a Regexp index with 3 arguments raises a TypeError if #to_int does not return a Fixnum"
|
206
|
+
fails "String#[]= with a Regexp index with 3 arguments uses the 2nd of 3 arguments as which capture should be replaced"
|
207
|
+
fails "String#[]= with a Regexp index with 3 arguments allows the specified capture to be negative and count from the end"
|
208
|
+
fails "String#[]= with a Regexp index with 3 arguments checks the match index before calling #to_str to convert the replacement"
|
209
|
+
fails "String#[]= with a Regexp index with 3 arguments raises IndexError if the specified capture isn't available"
|
210
|
+
fails "String#[]= with a Regexp index with 3 arguments when the optional capture does not match raises an IndexError before setting the replacement"
|
211
|
+
fails "String#[]= with a Range index replaces the contents with a shorter String"
|
212
|
+
fails "String#[]= with a Range index replaces the contents with a longer String"
|
213
|
+
fails "String#[]= with a Range index replaces a partial string"
|
214
|
+
fails "String#[]= with a Range index raises a RangeError if negative Range begin is out of range"
|
215
|
+
fails "String#[]= with a Range index raises a RangeError if positive Range begin is greater than String size"
|
216
|
+
fails "String#[]= with a Range index uses the Range end as an index rather than a count"
|
217
|
+
fails "String#[]= with a Range index treats a negative out-of-range Range end with a positive Range begin as a zero count"
|
218
|
+
fails "String#[]= with a Range index treats a negative out-of-range Range end with a negative Range begin as a zero count"
|
219
|
+
fails "String#[]= with a Range index with an empty replacement does not replace a character with a zero-index, zero exclude-end range"
|
220
|
+
fails "String#[]= with a Range index with an empty replacement does not replace a character with a zero exclude-end range"
|
221
|
+
fails "String#[]= with a Range index with an empty replacement replaces a character with zero-index, zero non-exclude-end range"
|
222
|
+
fails "String#[]= with a Range index with an empty replacement replaces a character with a zero non-exclude-end range"
|
223
|
+
fails "String#[]= with Fixnum index, count starts at idx and overwrites count characters before inserting the rest of other_str"
|
224
|
+
fails "String#[]= with Fixnum index, count counts negative idx values from end of the string"
|
225
|
+
fails "String#[]= with Fixnum index, count overwrites and deletes characters if count is more than the length of other_str"
|
226
|
+
fails "String#[]= with Fixnum index, count deletes characters if other_str is an empty string"
|
227
|
+
fails "String#[]= with Fixnum index, count deletes characters up to the maximum length of the existing string"
|
228
|
+
fails "String#[]= with Fixnum index, count appends other_str to the end of the string if idx == the length of the string"
|
229
|
+
fails "String#[]= with Fixnum index, count taints self if other_str is tainted"
|
230
|
+
fails "String#[]= with Fixnum index, count calls #to_int to convert the index and count objects"
|
231
|
+
fails "String#[]= with Fixnum index, count raises a TypeError if #to_int for index does not return an Integer"
|
232
|
+
fails "String#[]= with Fixnum index, count raises a TypeError if #to_int for count does not return an Integer"
|
233
|
+
fails "String#[]= with Fixnum index, count calls #to_str to convert the replacement object"
|
234
|
+
fails "String#[]= with Fixnum index, count raises a TypeError of #to_str does not return a String"
|
235
|
+
fails "String#[]= with Fixnum index, count raises an IndexError if |idx| is greater than the length of the string"
|
236
|
+
fails "String#[]= with Fixnum index, count raises an IndexError if count < 0"
|
237
|
+
fails "String#[]= with Fixnum index, count raises a TypeError if other_str is a type other than String"
|
238
|
+
|
239
|
+
fails "String#squeeze! modifies self in place and returns self"
|
240
|
+
fails "String#squeeze! returns nil if no modifications were made"
|
241
|
+
fails "String#squeeze! raises an ArgumentError when the parameter is out of sequence"
|
242
|
+
fails "String#squeeze! raises a RuntimeError when self is frozen"
|
243
|
+
|
244
|
+
fails "String#strip! modifies self in place and returns self"
|
245
|
+
fails "String#strip! returns nil if no modifications where made"
|
246
|
+
fails "String#strip! modifies self removing trailing NULL bytes and whitespace"
|
247
|
+
fails "String#strip! raises a RuntimeError on a frozen instance that is modified"
|
248
|
+
fails "String#strip! raises a RuntimeError on a frozen instance that would not be modified"
|
249
|
+
|
250
|
+
fails "String#sub! with pattern, replacement modifies self in place and returns self"
|
251
|
+
fails "String#sub! with pattern, replacement taints self if replacement is tainted"
|
252
|
+
fails "String#sub! with pattern, replacement returns nil if no modifications were made"
|
253
|
+
fails "String#sub! with pattern, replacement raises a RuntimeError when self is frozen"
|
254
|
+
fails "String#sub! with pattern and block modifies self in place and returns self"
|
255
|
+
fails "String#sub! with pattern and block sets $~ for access from the block"
|
256
|
+
fails "String#sub! with pattern and block taints self if block's result is tainted"
|
257
|
+
fails "String#sub! with pattern and block returns nil if no modifications were made"
|
258
|
+
fails "String#sub! with pattern and block raises a RuntimeError if the string is modified while substituting"
|
259
|
+
fails "String#sub! with pattern and block raises a RuntimeError when self is frozen"
|
260
|
+
|
261
|
+
fails "String#succ! is equivalent to succ, but modifies self in place (still returns self)"
|
262
|
+
fails "String#succ! raises a RuntimeError if self is frozen"
|
263
|
+
|
264
|
+
fails "String#tr! modifies self in place"
|
265
|
+
fails "String#tr! returns nil if no modification was made"
|
266
|
+
fails "String#tr! does not modify self if from_str is empty"
|
267
|
+
fails "String#tr! raises a RuntimeError if self is frozen"
|
268
|
+
|
269
|
+
fails "String#tr_s! modifies self in place"
|
270
|
+
fails "String#tr_s! returns nil if no modification was made"
|
271
|
+
fails "String#tr_s! does not modify self if from_str is empty"
|
272
|
+
fails "String#tr_s! raises a RuntimeError if self is frozen"
|
273
|
+
|
274
|
+
fails "String#setbyte raises a TypeError unless the second argument is an Integer"
|
275
|
+
fails "String#setbyte raises a RuntimeError if self is frozen"
|
276
|
+
fails "String#setbyte does not modify the original string when using String.new"
|
277
|
+
fails "String#setbyte sets a byte at an index greater than String size"
|
278
|
+
fails "String#setbyte raises an IndexError if the nexgative index is greater magnitude than the String bytesize"
|
279
|
+
fails "String#setbyte raises an IndexError if the index is greater than the String bytesize"
|
280
|
+
fails "String#setbyte regards a negative index as counting from the end of the String"
|
281
|
+
fails "String#setbyte can invalidate a String's encoding"
|
282
|
+
fails "String#setbyte allows changing bytes in multi-byte characters"
|
283
|
+
fails "String#setbyte changes the byte at the given index to the new byte"
|
284
|
+
fails "String#setbyte modifies the receiver"
|
285
|
+
fails "String#setbyte returns an Integer"
|
286
|
+
|
287
|
+
fails "String#prepend taints self if other is tainted"
|
288
|
+
fails "String#prepend works when given a subclass instance"
|
289
|
+
fails "String#prepend raises a RuntimeError when self if frozen"
|
290
|
+
fails "String#prepend raises a TypeError if the given argument can't be converted to a String"
|
291
|
+
fails "String#prepend converts the given argument to a String using to_str"
|
292
|
+
fails "String#prepend prepends the given argument to self and returns self"
|
293
|
+
|
294
|
+
fails "String#replace raises a RuntimeError on a frozen instance when self-replacing"
|
295
|
+
fails "String#replace raises a RuntimeError on a frozen instance that is modified"
|
296
|
+
fails "String#replace raises a TypeError if other can't be converted to string"
|
297
|
+
fails "String#replace tries to convert other to string using to_str"
|
298
|
+
fails "String#replace replaces the encoding of self with that of other"
|
299
|
+
fails "String#replace does not trust self if other is trusted"
|
300
|
+
fails "String#replace untrusts self if other is untrusted"
|
301
|
+
fails "String#replace does not untaint self if other is untainted"
|
302
|
+
fails "String#replace taints self if other is tainted"
|
303
|
+
fails "String#replace replaces the content of self with other"
|
304
|
+
fails "String#replace returns self"
|
305
|
+
fails "String#replace does not raise an exception when frozen"
|
306
|
+
|
307
|
+
fails "String#insert with index, other raises a RuntimeError if self is frozen"
|
308
|
+
fails "String#insert with index, other raises a TypeError if other can't be converted to string"
|
309
|
+
fails "String#insert with index, other taints self if string to insert is tainted"
|
310
|
+
fails "String#insert with index, other converts other to a string using to_str"
|
311
|
+
fails "String#insert with index, other converts index to an integer using to_int"
|
312
|
+
fails "String#insert with index, other raises an IndexError if the index is beyond string"
|
313
|
+
fails "String#insert with index, other inserts after the given character on an negative count"
|
314
|
+
fails "String#insert with index, other modifies self in place"
|
315
|
+
fails "String#insert with index, other inserts other before the character at the given index"
|
316
|
+
|
317
|
+
fails "String#delete! modifies self in place and returns self"
|
318
|
+
fails "String#delete! returns nil if no modifications were made"
|
319
|
+
fails "String#delete! raises a RuntimeError when self is frozen"
|
320
|
+
|
321
|
+
fails "String#concat concatenates the given argument to self and returns self"
|
322
|
+
fails "String#concat converts the given argument to a String using to_str"
|
323
|
+
fails "String#concat raises a TypeError if the given argument can't be converted to a String"
|
324
|
+
fails "String#concat raises a RuntimeError when self is frozen"
|
325
|
+
fails "String#concat works when given a subclass instance"
|
326
|
+
fails "String#concat taints self if other is tainted"
|
327
|
+
fails "String#concat untrusts self if other is untrusted"
|
328
|
+
fails "String#concat with Integer concatencates the argument interpreted as a codepoint"
|
329
|
+
fails "String#concat with Integer returns a ASCII-8BIT string if self is US-ASCII and the argument is between 128-255 (inclusive)"
|
330
|
+
fails "String#concat with Integer raises RangeError if the argument is an invalid codepoint for self's encoding"
|
331
|
+
fails "String#concat with Integer raises RangeError if the argument is negative"
|
332
|
+
fails "String#concat with Integer doesn't call to_int on its argument"
|
333
|
+
fails "String#concat with Integer raises a RuntimeError when self is frozen"
|
334
|
+
fails "String#concat when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses self's encoding if both are empty"
|
335
|
+
fails "String#concat when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses self's encoding if the argument is empty"
|
336
|
+
fails "String#concat when self is in an ASCII-incompatible encoding incompatible with the argument's encoding uses the argument's encoding if self is empty"
|
337
|
+
fails "String#concat when self is in an ASCII-incompatible encoding incompatible with the argument's encoding raises Encoding::CompatibilityError if neither are empty"
|
338
|
+
fails "String#concat when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses self's encoding if both are empty"
|
339
|
+
fails "String#concat when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses self's encoding if the argument is empty"
|
340
|
+
fails "String#concat when the argument is in an ASCII-incompatible encoding incompatible with self's encoding uses the argument's encoding if self is empty"
|
341
|
+
fails "String#concat when the argument is in an ASCII-incompatible encoding incompatible with self's encoding raises Encoding::CompatibilityError if neither are empty"
|
342
|
+
fails "String#concat when self and the argument are in different ASCII-compatible encodings uses self's encoding if both are ASCII-only"
|
343
|
+
fails "String#concat when self and the argument are in different ASCII-compatible encodings uses self's encoding if the argument is ASCII-only"
|
344
|
+
fails "String#concat when self and the argument are in different ASCII-compatible encodings uses the argument's encoding if self is ASCII-only"
|
345
|
+
fails "String#concat when self and the argument are in different ASCII-compatible encodings raises Encoding::CompatibilityError if neither are ASCII-only"
|
346
|
+
fails "String#concat when self is ASCII-8BIT and argument is US-ASCII uses ASCII-8BIT encoding"
|
49
347
|
end
|