opal 0.8.1 → 0.9.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/.gitmodules +3 -3
- data/.jshintrc +17 -20
- data/.travis.yml +22 -11
- data/CHANGELOG.md +51 -1
- data/CODE_OF_CONDUCT.md +15 -0
- data/CONTRIBUTING.md +125 -9
- data/Gemfile +1 -1
- data/Guardfile +2 -2
- data/README.md +95 -29
- data/Rakefile +1 -1
- data/benchmark/benchmarks +103 -0
- data/benchmark/bm_array_flatten.rb +9 -0
- data/benchmark/bm_array_intersection_numbers.rb +7 -0
- data/benchmark/bm_array_intersection_objects.rb +7 -0
- data/benchmark/bm_array_intersection_strings.rb +7 -0
- data/benchmark/bm_array_join_ary.rb +9 -0
- data/benchmark/bm_array_minus_numbers.rb +7 -0
- data/benchmark/bm_array_minus_objects.rb +7 -0
- data/benchmark/bm_array_minus_strings.rb +7 -0
- data/benchmark/bm_array_union_numbers.rb +7 -0
- data/benchmark/bm_array_union_objects.rb +7 -0
- data/benchmark/bm_array_union_strings.rb +7 -0
- data/benchmark/bm_array_uniq_bang_numbers.rb +5 -0
- data/benchmark/bm_array_uniq_bang_objects.rb +5 -0
- data/benchmark/bm_array_uniq_bang_strings.rb +5 -0
- data/benchmark/bm_array_uniq_numbers.rb +5 -0
- data/benchmark/bm_array_uniq_objects.rb +5 -0
- data/benchmark/bm_array_uniq_strings.rb +5 -0
- data/benchmark/bm_dispatch_bind_table.rb +57 -0
- data/benchmark/bm_dispatch_code_gen.rb +65 -0
- data/benchmark/bm_dispatch_code_gen_if.rb +64 -0
- data/benchmark/bm_dispatch_hardcoded.rb +44 -0
- data/benchmark/bm_dispatch_send.rb +38 -0
- data/benchmark/bm_dispatch_send_table.rb +57 -0
- data/benchmark/bm_hash_assoc_object.rb +11 -0
- data/benchmark/bm_hash_assoc_string.rb +9 -0
- data/benchmark/bm_hash_clone_object.rb +9 -0
- data/benchmark/bm_hash_clone_string.rb +9 -0
- data/benchmark/bm_hash_delete_object.rb +11 -0
- data/benchmark/bm_hash_delete_string.rb +9 -0
- data/benchmark/bm_hash_each_key_object.rb +9 -0
- data/benchmark/bm_hash_each_key_string.rb +9 -0
- data/benchmark/bm_hash_each_object.rb +9 -0
- data/benchmark/bm_hash_each_string.rb +9 -0
- data/benchmark/bm_hash_each_value_object.rb +9 -0
- data/benchmark/bm_hash_each_value_string.rb +9 -0
- data/benchmark/bm_hash_element_reference_object.rb +11 -0
- data/benchmark/bm_hash_element_reference_string.rb +9 -0
- data/benchmark/bm_hash_element_set_object.rb +5 -0
- data/benchmark/bm_hash_element_set_string.rb +5 -0
- data/benchmark/bm_hash_equal_value_object.rb +14 -0
- data/benchmark/bm_hash_equal_value_string.rb +11 -0
- data/benchmark/bm_hash_fetch_object.rb +11 -0
- data/benchmark/bm_hash_fetch_string.rb +9 -0
- data/benchmark/bm_hash_flatten_object.rb +9 -0
- data/benchmark/bm_hash_flatten_string.rb +9 -0
- data/benchmark/bm_hash_has_key_object.rb +11 -0
- data/benchmark/bm_hash_has_key_string.rb +9 -0
- data/benchmark/bm_hash_has_value_object.rb +9 -0
- data/benchmark/bm_hash_has_value_string.rb +9 -0
- data/benchmark/bm_hash_hash_object.rb +9 -0
- data/benchmark/bm_hash_hash_string.rb +9 -0
- data/benchmark/bm_hash_inspect_object.rb +9 -0
- data/benchmark/bm_hash_inspect_string.rb +9 -0
- data/benchmark/bm_hash_invert_object.rb +9 -0
- data/benchmark/bm_hash_invert_string.rb +9 -0
- data/benchmark/bm_hash_keep_if_object.rb +9 -0
- data/benchmark/bm_hash_keep_if_string.rb +9 -0
- data/benchmark/bm_hash_key_object.rb +9 -0
- data/benchmark/bm_hash_key_string.rb +9 -0
- data/benchmark/bm_hash_keys_object.rb +9 -0
- data/benchmark/bm_hash_keys_string.rb +9 -0
- data/benchmark/bm_hash_literal_mixed_large.rb +3 -0
- data/benchmark/bm_hash_literal_mixed_small.rb +3 -0
- data/benchmark/bm_hash_literal_object_large.rb +4 -0
- data/benchmark/bm_hash_literal_object_small.rb +3 -0
- data/benchmark/bm_hash_literal_string_large.rb +4 -0
- data/benchmark/bm_hash_literal_string_small.rb +3 -0
- data/benchmark/bm_hash_merge_object.rb +22 -0
- data/benchmark/bm_hash_merge_string.rb +18 -0
- data/benchmark/bm_hash_rassoc_object.rb +9 -0
- data/benchmark/bm_hash_rassoc_string.rb +9 -0
- data/benchmark/bm_hash_rehash_object.rb +9 -0
- data/benchmark/bm_hash_rehash_string.rb +9 -0
- data/benchmark/bm_hash_reject_bang_object.rb +9 -0
- data/benchmark/bm_hash_reject_bang_string.rb +9 -0
- data/benchmark/bm_hash_reject_object.rb +9 -0
- data/benchmark/bm_hash_reject_string.rb +9 -0
- data/benchmark/bm_hash_replace_object.rb +18 -0
- data/benchmark/bm_hash_replace_string.rb +14 -0
- data/benchmark/bm_hash_select_bang_object.rb +9 -0
- data/benchmark/bm_hash_select_bang_string.rb +9 -0
- data/benchmark/bm_hash_select_object.rb +9 -0
- data/benchmark/bm_hash_select_string.rb +9 -0
- data/benchmark/bm_hash_shift_object.rb +10 -0
- data/benchmark/bm_hash_shift_string.rb +10 -0
- data/benchmark/bm_hash_to_a_object.rb +9 -0
- data/benchmark/bm_hash_to_a_string.rb +9 -0
- data/benchmark/bm_hash_to_h_object.rb +10 -0
- data/benchmark/bm_hash_to_h_string.rb +10 -0
- data/benchmark/bm_hash_values_object.rb +9 -0
- data/benchmark/bm_hash_values_string.rb +9 -0
- data/benchmark/run.rb +48 -0
- data/bin/opal-mspec +1 -1
- data/bin/opal-repl +4 -4
- data/docs/compiled_ruby.md +214 -56
- data/docs/configuring_gems.md +2 -2
- data/docs/faq.md +2 -2
- data/docs/getting_started.md +19 -2
- data/docs/jquery.md +5 -5
- data/docs/opal_parser.md +53 -0
- data/docs/unsupported_features.md +2 -2
- data/docs/upgrading.md +22 -0
- data/docs/using_sprockets.md +15 -0
- data/examples/rack/config.ru +13 -0
- data/examples/sinatra/config.ru +4 -5
- data/lib/mspec/opal/runner.rb +54 -11
- data/lib/opal.rb +1 -1
- data/lib/opal/builder.rb +1 -1
- data/lib/opal/builder_processors.rb +1 -1
- data/lib/opal/cli.rb +17 -13
- data/lib/opal/cli_options.rb +1 -1
- data/lib/opal/compiler.rb +12 -0
- data/lib/opal/config.rb +4 -0
- data/lib/opal/nodes/arglist.rb +5 -7
- data/lib/opal/nodes/call.rb +6 -1
- data/lib/opal/nodes/call_special.rb +74 -0
- data/lib/opal/nodes/def.rb +35 -28
- data/lib/opal/nodes/definitions.rb +3 -5
- data/lib/opal/nodes/for.rb +13 -0
- data/lib/opal/nodes/helpers.rb +15 -1
- data/lib/opal/nodes/if.rb +5 -5
- data/lib/opal/nodes/iter.rb +6 -1
- data/lib/opal/nodes/literal.rb +1 -1
- data/lib/opal/nodes/logic.rb +2 -2
- data/lib/opal/nodes/masgn.rb +1 -2
- data/lib/opal/nodes/module.rb +2 -1
- data/lib/opal/nodes/rescue.rb +10 -1
- data/lib/opal/nodes/scope.rb +8 -2
- data/lib/opal/nodes/singleton_class.rb +1 -1
- data/lib/opal/nodes/top.rb +11 -0
- data/lib/opal/nodes/variables.rb +4 -4
- data/lib/opal/parser.rb +21 -3
- data/lib/opal/parser/grammar.rb +3115 -2961
- data/lib/opal/parser/grammar.y +29 -6
- data/lib/opal/parser/lexer.rb +18 -8
- data/lib/opal/sprockets.rb +85 -0
- data/lib/opal/sprockets/processor.rb +11 -35
- data/lib/opal/sprockets/server.rb +3 -15
- data/lib/opal/version.rb +2 -2
- data/opal.gemspec +4 -4
- data/opal/README.md +9 -0
- data/opal/corelib/array.rb +433 -181
- data/opal/corelib/basic_object.rb +48 -4
- data/opal/corelib/boolean.rb +15 -6
- data/opal/corelib/class.rb +6 -5
- data/opal/corelib/comparable.rb +12 -0
- data/opal/corelib/complex.rb +282 -0
- data/opal/corelib/constants.rb +9 -0
- data/opal/corelib/enumerable.rb +83 -34
- data/opal/corelib/enumerator.rb +3 -1
- data/opal/corelib/error.rb +49 -10
- data/opal/corelib/file.rb +1 -0
- data/opal/corelib/hash.rb +353 -577
- data/opal/corelib/helpers.rb +20 -0
- data/opal/corelib/kernel.rb +114 -59
- data/opal/corelib/math.rb +470 -0
- data/opal/corelib/method.rb +11 -2
- data/opal/corelib/module.rb +96 -96
- data/opal/corelib/{nil_class.rb → nil.rb} +20 -1
- data/opal/corelib/number.rb +751 -0
- data/opal/corelib/numeric.rb +77 -437
- data/opal/corelib/proc.rb +81 -1
- data/opal/corelib/process.rb +27 -0
- data/opal/corelib/rational.rb +358 -0
- data/opal/corelib/regexp.rb +156 -27
- data/opal/corelib/runtime.js +724 -335
- data/opal/corelib/string.rb +93 -104
- data/opal/corelib/string/encoding.rb +177 -0
- data/opal/corelib/string/inheritance.rb +2 -0
- data/opal/corelib/struct.rb +105 -18
- data/opal/corelib/time.rb +267 -146
- data/opal/corelib/unsupported.rb +216 -0
- data/opal/corelib/variables.rb +0 -6
- data/opal/opal.rb +8 -22
- data/opal/opal/base.rb +9 -0
- data/opal/opal/mini.rb +17 -0
- data/spec/README.md +1 -1
- data/spec/filters/bugs/array.rb +38 -136
- data/spec/filters/bugs/{basic_object.rb → basicobject.rb} +14 -15
- data/spec/filters/bugs/class.rb +6 -12
- data/spec/filters/bugs/complex.rb +3 -0
- data/spec/filters/bugs/date.rb +162 -10
- data/spec/filters/bugs/enumerable.rb +31 -58
- data/spec/filters/bugs/enumerator.rb +42 -0
- data/spec/filters/bugs/exception.rb +66 -10
- data/spec/filters/bugs/float.rb +17 -0
- data/spec/filters/bugs/hash.rb +11 -97
- data/spec/filters/bugs/inheritance.rb +5 -0
- data/spec/filters/bugs/integer.rb +28 -0
- data/spec/filters/bugs/kernel.rb +304 -12
- data/spec/filters/bugs/language.rb +133 -399
- data/spec/filters/bugs/language_opal.rb +88 -0
- data/spec/filters/bugs/module.rb +203 -62
- data/spec/filters/bugs/numeric.rb +32 -0
- data/spec/filters/bugs/proc.rb +39 -0
- data/spec/filters/bugs/range.rb +148 -0
- data/spec/filters/bugs/regexp.rb +168 -0
- data/spec/filters/bugs/set.rb +46 -3
- data/spec/filters/bugs/singleton.rb +1 -2
- data/spec/filters/bugs/string.rb +59 -90
- data/spec/filters/bugs/strscan.rb +80 -0
- data/spec/filters/bugs/struct.rb +10 -20
- data/spec/filters/bugs/time.rb +17 -184
- data/spec/filters/bugs/unboundmethod.rb +22 -0
- data/spec/filters/unsupported/array.rb +163 -0
- data/spec/filters/unsupported/basicobject.rb +14 -0
- data/spec/filters/unsupported/bignum.rb +46 -0
- data/spec/filters/unsupported/class.rb +4 -0
- data/spec/filters/unsupported/delegator.rb +5 -0
- data/spec/filters/unsupported/enumerable.rb +11 -0
- data/spec/filters/unsupported/enumerator.rb +8 -9
- data/spec/filters/unsupported/fixnum.rb +14 -0
- data/spec/filters/unsupported/float.rb +41 -7
- data/spec/filters/unsupported/freeze.rb +45 -0
- data/spec/filters/unsupported/hash.rb +50 -0
- data/spec/filters/unsupported/integer.rb +3 -0
- data/spec/filters/unsupported/kernel.rb +31 -0
- data/spec/filters/unsupported/language.rb +17 -0
- data/spec/filters/unsupported/matchdata.rb +30 -0
- data/spec/filters/unsupported/math.rb +3 -0
- data/spec/filters/unsupported/module.rb +5 -3
- data/spec/filters/unsupported/pathname.rb +3 -0
- data/spec/filters/unsupported/privacy.rb +136 -0
- data/spec/filters/unsupported/proc.rb +3 -0
- data/spec/filters/unsupported/regexp.rb +59 -0
- data/spec/filters/unsupported/set.rb +4 -0
- data/spec/filters/unsupported/{marshal.rb → singleton.rb} +4 -2
- data/spec/filters/unsupported/{mutable_strings.rb → string.rb} +456 -336
- data/spec/filters/unsupported/struct.rb +3 -0
- data/spec/filters/unsupported/symbol.rb +5 -0
- data/spec/filters/unsupported/taint.rb +16 -0
- data/spec/filters/unsupported/thread.rb +5 -0
- data/spec/filters/unsupported/time.rb +197 -16
- data/spec/lib/cli_spec.rb +14 -4
- data/spec/lib/compiler_spec.rb +9 -1
- data/spec/lib/parser/call_spec.rb +18 -0
- data/spec/lib/parser/not_spec.rb +2 -8
- data/spec/lib/sprockets_spec.rb +24 -0
- data/spec/opal/core/array/intersection_spec.rb +38 -0
- data/spec/opal/core/array/minus_spec.rb +38 -0
- data/spec/opal/core/array/union_spec.rb +38 -0
- data/spec/opal/core/array/uniq_spec.rb +49 -0
- data/spec/opal/core/exception_spec.rb +7 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
- data/spec/opal/core/hash/internals_spec.rb +332 -0
- data/spec/opal/core/helpers_spec.rb +14 -0
- data/spec/opal/core/kernel/freeze_spec.rb +1 -1
- data/spec/opal/core/kernel/raise_spec.rb +13 -0
- data/spec/opal/core/kernel/require_tree_spec.rb +9 -0
- data/spec/opal/core/language/class_spec.rb +55 -0
- data/spec/opal/core/language/fixtures/send.rb +1 -0
- data/spec/opal/core/language/keyword_arguments_spec.rb +11 -0
- data/spec/opal/core/language/send_spec.rb +5 -0
- data/spec/opal/core/method/to_proc_spec.rb +28 -0
- data/spec/opal/core/module/name_spec.rb +0 -17
- data/spec/opal/core/runtime/bridged_classes_spec.rb +2 -2
- data/spec/opal/core/runtime/eval_spec.rb +1 -1
- data/spec/opal/core/runtime/method_missing_spec.rb +6 -0
- data/spec/opal/core/runtime_spec.rb +51 -0
- data/spec/opal/stdlib/js_spec.rb +66 -0
- data/spec/opal/stdlib/native/hash_spec.rb +36 -0
- data/spec/rubyspecs +152 -273
- data/spec/spec_helper.rb +10 -11
- data/stdlib/base64.rb +9 -9
- data/stdlib/benchmark.rb +551 -4
- data/stdlib/console.rb +94 -0
- data/stdlib/date.rb +1 -1
- data/stdlib/encoding.rb +1 -170
- data/stdlib/js.rb +56 -0
- data/stdlib/json.rb +9 -14
- data/stdlib/math.rb +1 -370
- data/stdlib/native.rb +133 -63
- data/stdlib/nodejs/file.rb +5 -0
- data/stdlib/nodejs/fileutils.rb +13 -6
- data/stdlib/nodejs/node_modules/js-yaml/node_modules/argparse/README.md +1 -1
- data/stdlib/opal-parser.rb +1 -2
- data/stdlib/ostruct.rb +65 -6
- data/stdlib/pp.rb +2 -4
- data/stdlib/rbconfig.rb +1 -3
- data/stdlib/strscan.rb +164 -28
- data/tasks/benchmarking.rake +88 -0
- data/tasks/testing.rake +181 -55
- data/{lib/mspec/opal/special_calls.rb → tasks/testing/mspec_special_calls.rb} +1 -1
- data/{lib/mspec/opal/sprockets.js → tasks/testing/phantomjs1-sprockets.js} +17 -6
- data/test/opal/test_keyword.rb +590 -0
- data/vendored-minitest/minitest.rb +2 -2
- data/vendored-minitest/test/unit.rb +5 -0
- metadata +229 -62
- data/benchmarks/operators.rb +0 -11
- data/benchmarks/prova.js.rb +0 -13
- data/docs/libraries.md +0 -36
- data/lib/mspec/opal/new.html.erb +0 -1
- data/lib/mspec/opal/rake_task.rb +0 -248
- data/opal/corelib/match_data.rb +0 -128
- data/spec/filters/bugs/math.rb +0 -95
- data/spec/filters/bugs/nil.rb +0 -7
- data/spec/filters/bugs/opal.rb +0 -9
- data/spec/filters/bugs/regular_expressions.rb +0 -41
- data/spec/filters/bugs/stringscanner.rb +0 -33
- data/spec/filters/unsupported/encoding.rb +0 -102
- data/spec/filters/unsupported/frozen.rb +0 -92
- data/spec/filters/unsupported/hash_compare_by_identity.rb +0 -16
- data/spec/filters/unsupported/integer_size.rb +0 -59
- data/spec/filters/unsupported/method_added.rb +0 -10
- data/spec/filters/unsupported/private_constants.rb +0 -30
- data/spec/filters/unsupported/private_methods.rb +0 -55
- data/spec/filters/unsupported/random.rb +0 -4
- data/spec/filters/unsupported/rational_numbers.rb +0 -4
- data/spec/filters/unsupported/regular_expressions.rb +0 -137
- data/spec/filters/unsupported/ruby_exe.rb +0 -5
- data/spec/filters/unsupported/symbols.rb +0 -17
- data/spec/filters/unsupported/tainted.rb +0 -180
- data/spec/filters/unsupported/trusted.rb +0 -88
- data/stdlib/process.rb +0 -10
- data/tasks/documenting.rake +0 -37
@@ -0,0 +1,168 @@
|
|
1
|
+
opal_filter "regular_expressions" do
|
2
|
+
fails "Regexp#=== returns false if the other value cannot be coerced to a string"
|
3
|
+
fails "Regexp#hash is based on the text and options of Regexp"
|
4
|
+
fails "Regexp#hash returns the same value for two Regexps differing only in the /n option"
|
5
|
+
fails "Regexp#initialize is a private method"
|
6
|
+
fails "Regexp#initialize raises a SecurityError on a Regexp literal"
|
7
|
+
fails "Regexp#initialize raises a TypeError on an initialized non-literal Regexp"
|
8
|
+
fails "Regexp#inspect correctly escapes forward slashes /"
|
9
|
+
fails "Regexp#inspect does not include a character set code"
|
10
|
+
fails "Regexp#inspect does not include the 'o' option"
|
11
|
+
fails "Regexp#inspect does not over escape"
|
12
|
+
fails "Regexp#inspect escapes 2 slashes in a row properly"
|
13
|
+
fails "Regexp#inspect returns a formatted string that would eval to the same regexp"
|
14
|
+
fails "Regexp#inspect returns options in the order 'mixn'"
|
15
|
+
fails "Regexp#match raises a TypeError on an uninitialized Regexp"
|
16
|
+
fails "Regexp#options returns 0 for a Regexp literal without options"
|
17
|
+
fails "Regexp#source returns the original string of the pattern"
|
18
|
+
fails "Regexp#to_s deals properly with the two types of lookahead groups"
|
19
|
+
fails "Regexp#to_s returns a string in (?xxx:yyy) notation"
|
20
|
+
fails "Regexp#to_s shows all options as excluded if none are selected"
|
21
|
+
fails "Regexp#to_s shows non-included options after a - sign"
|
22
|
+
fails "Regexp#to_s shows the pattern after the options"
|
23
|
+
fails "Regexp.compile given a Regexp does not honour options given as additional arguments"
|
24
|
+
fails "Regexp.compile given a Regexp preserves any options given in the Regexp literal"
|
25
|
+
fails "Regexp.compile given a Regexp uses the argument as a literal to construct a Regexp object"
|
26
|
+
fails "Regexp.compile given a String accepts a Fixnum of two or more options ORed together as the second argument"
|
27
|
+
fails "Regexp.compile given a String does not set Regexp options if only given one argument"
|
28
|
+
fails "Regexp.compile given a String does not set Regexp options if second argument is nil or false"
|
29
|
+
fails "Regexp.compile given a String ignores the third argument if it is 'e' or 'euc' (case-insensitive)"
|
30
|
+
fails "Regexp.compile given a String ignores the third argument if it is 's' or 'sjis' (case-insensitive)"
|
31
|
+
fails "Regexp.compile given a String ignores the third argument if it is 'u' or 'utf8' (case-insensitive)"
|
32
|
+
fails "Regexp.compile given a String raises a RegexpError when passed an incorrect regexp"
|
33
|
+
fails "Regexp.compile given a String sets options from second argument if it is one of the Fixnum option constants"
|
34
|
+
fails "Regexp.compile given a String treats any non-Fixnum, non-nil, non-false second argument as IGNORECASE"
|
35
|
+
fails "Regexp.compile given a String uses ASCII_8BIT encoding if third argument is 'n' or 'none' (case insensitive) and non-ascii characters"
|
36
|
+
fails "Regexp.compile given a String uses the String argument as an unescaped literal to construct a Regexp object"
|
37
|
+
fails "Regexp.compile given a String uses US_ASCII encoding if third argument is 'n' or 'none' (case insensitive) and only ascii characters"
|
38
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\a'"
|
39
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\a'"
|
40
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\e'"
|
41
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\f'"
|
42
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\n'"
|
43
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\r'"
|
44
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\t'"
|
45
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\C-\\v'"
|
46
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\a'"
|
47
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\e'"
|
48
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\f'"
|
49
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\n'"
|
50
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\r'"
|
51
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\t'"
|
52
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\c\\v'"
|
53
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\e'"
|
54
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\f'"
|
55
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\a'"
|
56
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\a'"
|
57
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\e'"
|
58
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\f'"
|
59
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\n'"
|
60
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\r'"
|
61
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\t'"
|
62
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\C-\\v'"
|
63
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\a'"
|
64
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\e'"
|
65
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\f'"
|
66
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\n'"
|
67
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\r'"
|
68
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\t'"
|
69
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\c\\v'"
|
70
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\e'"
|
71
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\f'"
|
72
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\n'"
|
73
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\r'"
|
74
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\t'"
|
75
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\M-\\v'"
|
76
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\n'"
|
77
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\r'"
|
78
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\t'"
|
79
|
+
fails "Regexp.compile given a String with escaped characters accepts '\\v'"
|
80
|
+
fails "Regexp.compile given a String with escaped characters accepts a backspace followed by a character"
|
81
|
+
fails "Regexp.compile given a String with escaped characters accepts a combination of escaped octal and hexadecimal digits and \\uHHHH"
|
82
|
+
fails "Regexp.compile given a String with escaped characters accepts a combination of escaped octal and hexadecimal digits and \\u{HHHH}"
|
83
|
+
fails "Regexp.compile given a String with escaped characters accepts a one-digit hexadecimal value"
|
84
|
+
fails "Regexp.compile given a String with escaped characters accepts a one-digit octal value"
|
85
|
+
fails "Regexp.compile given a String with escaped characters accepts a three-digit octal value"
|
86
|
+
fails "Regexp.compile given a String with escaped characters accepts a two-digit hexadecimal value"
|
87
|
+
fails "Regexp.compile given a String with escaped characters accepts a two-digit octal value"
|
88
|
+
fails "Regexp.compile given a String with escaped characters accepts an escaped string interpolation"
|
89
|
+
fails "Regexp.compile given a String with escaped characters accepts characters and escaped hexadecimal digits"
|
90
|
+
fails "Regexp.compile given a String with escaped characters accepts characters and escaped octal digits"
|
91
|
+
fails "Regexp.compile given a String with escaped characters accepts characters followed by \\uHHHH"
|
92
|
+
fails "Regexp.compile given a String with escaped characters accepts characters followed by \\u{HHHH}"
|
93
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped hexadecimal and octal digits"
|
94
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped hexadecimal digits and characters"
|
95
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped hexadecimal digits followed by \\uHHHH"
|
96
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped hexadecimal digits followed by \\u{HHHH}"
|
97
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped octal digits and characters"
|
98
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped octal digits followed by \\uHHHH"
|
99
|
+
fails "Regexp.compile given a String with escaped characters accepts escaped octal digits followed by \\u{HHHH}"
|
100
|
+
fails "Regexp.compile given a String with escaped characters accepts multiple consecutive '\\' characters"
|
101
|
+
fails "Regexp.compile given a String with escaped characters accepts \\uHHHH followed by characters"
|
102
|
+
fails "Regexp.compile given a String with escaped characters accepts \\uHHHH for a single Unicode codepoint"
|
103
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{HHHHHH} for a single Unicode codepoint"
|
104
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{HHHHH} for a single Unicode codepoint"
|
105
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{HHHH} followed by characters"
|
106
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{HHHH} for a single Unicode codepoint"
|
107
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{HHH} for a single Unicode codepoint"
|
108
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{HH} for a single Unicode codepoint"
|
109
|
+
fails "Regexp.compile given a String with escaped characters accepts \\u{H} for a single Unicode codepoint"
|
110
|
+
fails "Regexp.compile given a String with escaped characters interprets a digit following a three-digit octal value as a character"
|
111
|
+
fails "Regexp.compile given a String with escaped characters interprets a digit following a two-digit hexadecimal value as a character"
|
112
|
+
fails "Regexp.compile given a String with escaped characters raises a Regexp error if there is a trailing backslash"
|
113
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if less than four digits are given for \\uHHHH"
|
114
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if more than six hexadecimal digits are given"
|
115
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if the \\u{} escape is empty"
|
116
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if \\x is not followed by any hexadecimal digits"
|
117
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having the input String's encoding"
|
118
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding"
|
119
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present"
|
120
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having UTF-8 encoding if any UTF-8 escape sequences outside 7-bit ASCII are present"
|
121
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with the input String's encoding"
|
122
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding"
|
123
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present"
|
124
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with UTF-8 encoding if any UTF-8 escape sequences outside 7-bit ASCII are present"
|
125
|
+
fails "Regexp.compile requires one argument and creates a new regular expression object"
|
126
|
+
fails "Regexp.compile works by default for subclasses with overridden #initialize"
|
127
|
+
fails "Regexp.new given a String raises a RegexpError when passed an incorrect regexp"
|
128
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\a'"
|
129
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\e'"
|
130
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\f'"
|
131
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\n'"
|
132
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\r'"
|
133
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\t'"
|
134
|
+
fails "Regexp.new given a String with escaped characters accepts '\\C-\\v'"
|
135
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\a'"
|
136
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\e'"
|
137
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\f'"
|
138
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\n'"
|
139
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\r'"
|
140
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\t'"
|
141
|
+
fails "Regexp.new given a String with escaped characters accepts '\\c\\v'"
|
142
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\a'"
|
143
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\a'"
|
144
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\e'"
|
145
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\f'"
|
146
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\n'"
|
147
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\r'"
|
148
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\t'"
|
149
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\C-\\v'"
|
150
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\a'"
|
151
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\e'"
|
152
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\f'"
|
153
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\n'"
|
154
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\r'"
|
155
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\t'"
|
156
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\c\\v'"
|
157
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\e'"
|
158
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\f'"
|
159
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\n'"
|
160
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\r'"
|
161
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\t'"
|
162
|
+
fails "Regexp.new given a String with escaped characters accepts '\\M-\\v'"
|
163
|
+
fails "Regexp.new given a String with escaped characters raises a RegexpError if more than six hexadecimal digits are given"
|
164
|
+
fails "Regexp.new given a String with escaped characters raises a RegexpError if \\x is not followed by any hexadecimal digits"
|
165
|
+
fails "Regexp.new works by default for subclasses with overridden #initialize"
|
166
|
+
fails "Regexp.try_convert returns nil if given an argument that can't be converted to a Regexp"
|
167
|
+
fails "Regexp.try_convert tries to coerce the argument by calling #to_regexp"
|
168
|
+
end
|
data/spec/filters/bugs/set.rb
CHANGED
@@ -1,7 +1,50 @@
|
|
1
1
|
opal_filter "Set" do
|
2
|
-
fails "Set
|
2
|
+
fails "Set#& raises an ArgumentError when passed a non-Enumerable"
|
3
|
+
fails "Set#& returns a new Set containing only elements shared by self and the passed Enumerable"
|
3
4
|
fails "Set#== does not depend on the order of nested Sets"
|
5
|
+
fails "Set#== returns true when the passed Object is a Set and self and the Object contain the same elements"
|
6
|
+
fails "Set#divide divides self into a set of subsets based on the blocks return values"
|
7
|
+
fails "Set#divide when passed a block with an arity of 2 divides self into a set of subsets based on the blocks return values"
|
8
|
+
fails "Set#divide when passed a block with an arity of 2 yields each two Object to the block"
|
9
|
+
fails "Set#divide yields each Object to the block"
|
10
|
+
fails "Set#flatten raises an ArgumentError when self is recursive"
|
11
|
+
fails "Set#flatten returns a copy of self with each included Set flattened"
|
12
|
+
fails "Set#flatten! flattens self"
|
13
|
+
fails "Set#flatten! raises an ArgumentError when self is recursive"
|
14
|
+
fails "Set#flatten! returns nil when self was not modified"
|
15
|
+
fails "Set#flatten! returns self when self was modified"
|
16
|
+
fails "Set#flatten_merge flattens the passed Set and merges it into self"
|
17
|
+
fails "Set#flatten_merge is protected"
|
18
|
+
fails "Set#flatten_merge raises an ArgumentError when trying to flatten a recursive Set"
|
19
|
+
fails "Set#hash is static"
|
20
|
+
fails "Set#inspect correctly handles self-references"
|
21
|
+
fails "Set#intersection raises an ArgumentError when passed a non-Enumerable"
|
22
|
+
fails "Set#intersection returns a new Set containing only elements shared by self and the passed Enumerable"
|
23
|
+
fails "Set#keep_if keeps every element from self for which the passed block returns true"
|
24
|
+
fails "Set#keep_if returns an Enumerator when passed no block"
|
25
|
+
fails "Set#keep_if returns self"
|
26
|
+
fails "Set#keep_if yields every element of self"
|
4
27
|
fails "Set#merge raises an ArgumentError when passed a non-Enumerable"
|
5
|
-
|
6
|
-
fails "
|
28
|
+
fails "Set#pretty_print passes the 'pretty print' representation of self to the pretty print writer"
|
29
|
+
fails "Set#pretty_print_cycle passes the 'pretty print' representation of a self-referencing Set to the pretty print writer"
|
30
|
+
fails "Set#proper_subset? raises an ArgumentError when passed a non-Set"
|
31
|
+
fails "Set#proper_subset? returns true if passed a Set that self is a proper subset of"
|
32
|
+
fails "Set#proper_superset? raises an ArgumentError when passed a non-Set"
|
33
|
+
fails "Set#proper_superset? returns true if passed a Set that self is a proper superset of"
|
34
|
+
fails "Set#reject! deletes every element from self for which the passed block returns true"
|
35
|
+
fails "Set#reject! returns an Enumerator when passed no block"
|
36
|
+
fails "Set#reject! returns nil when self was not modified"
|
37
|
+
fails "Set#reject! returns self when self was modified"
|
38
|
+
fails "Set#reject! yields every element of self"
|
39
|
+
fails "Set#select! keeps every element from self for which the passed block returns true"
|
40
|
+
fails "Set#select! returns an Enumerator when passed no block"
|
41
|
+
fails "Set#select! returns nil when self was not modified"
|
42
|
+
fails "Set#select! returns self when self was modified"
|
43
|
+
fails "Set#select! yields every element of self"
|
44
|
+
fails "Set#subset? raises an ArgumentError when passed a non-Set"
|
45
|
+
fails "Set#subset? returns true if passed a Set that is equal to self or self is a subset of"
|
46
|
+
fails "Set#superset? raises an ArgumentError when passed a non-Set"
|
47
|
+
fails "Set#superset? returns true if passed a Set that equals self or self is a proper superset of"
|
48
|
+
fails "Set#^ raises an ArgumentError when passed a non-Enumerable"
|
49
|
+
fails "Set#^ returns a new Set containing elements that are not in both self and the passed Enumberable"
|
7
50
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
opal_filter "Singleton" do
|
2
2
|
fails "Singleton.instance returns an instance of the singleton's clone"
|
3
3
|
fails "Singleton.instance returns the same instance for multiple class to instance on clones"
|
4
|
-
|
5
|
-
fails "Singleton._load returns the singleton instance for anything passed in"
|
6
4
|
fails "Singleton._load returns the singleton instance for anything passed in to subclass"
|
5
|
+
fails "Singleton._load returns the singleton instance for anything passed in"
|
7
6
|
end
|
data/spec/filters/bugs/string.rb
CHANGED
@@ -1,107 +1,76 @@
|
|
1
1
|
opal_filter "String" do
|
2
|
-
#
|
3
|
-
fails "String#
|
4
|
-
fails "String#
|
5
|
-
|
6
|
-
fails "String#clone copies singleton methods"
|
2
|
+
fails "String#bytes agrees with #unpack('C*')"
|
3
|
+
fails "String#bytes returns #bytesize bytes"
|
4
|
+
fails "String#bytes yields each byte to a block if one is given, returning self"
|
5
|
+
fails "String#byteslice with Range calls to_int on range arguments"
|
7
6
|
fails "String#clone copies modules included in the singleton class"
|
8
|
-
fails "String#
|
9
|
-
|
7
|
+
fails "String#dump includes .force_encoding(name) if the encoding isn't ASCII compatible"
|
8
|
+
fails "String#dump returns a string with # not escaped when followed by any other character"
|
9
|
+
fails "String#dump returns a string with lower-case alpha characters unescaped"
|
10
|
+
fails "String#dump returns a string with multi-byte UTF-8 characters replaced by \\u{} notation with lower-case hex digits"
|
11
|
+
fails "String#dump returns a string with non-printing ASCII characters replaced by \\x notation"
|
12
|
+
fails "String#dump returns a string with non-printing single-byte UTF-8 characters replaced by \\x notation"
|
13
|
+
fails "String#dump returns a string with numeric characters unescaped"
|
14
|
+
fails "String#dump returns a string with printable non-alphanumeric characters unescaped"
|
15
|
+
fails "String#dump returns a string with special characters replaced with \\<char> notation"
|
16
|
+
fails "String#dump returns a string with upper-case alpha characters unescaped"
|
17
|
+
fails "String#dump returns a string with \" and \\ escaped with a backslash"
|
18
|
+
fails "String#dump returns a string with \\#<char> when # is followed by $, @, {"
|
19
|
+
fails "String#dump returns a subclass instance"
|
20
|
+
fails "String#dump taints the result if self is tainted"
|
21
|
+
fails "String#dump untrusts the result if self is untrusted"
|
10
22
|
fails "String#dup does not copy constants defined in the singleton class"
|
11
|
-
|
12
|
-
#
|
13
|
-
#
|
14
|
-
fails "String#
|
15
|
-
|
16
|
-
fails "String#byteslice returns the character code of the character at the given index"
|
17
|
-
fails "String#byteslice returns nil if index is outside of self"
|
18
|
-
fails "String#byteslice calls to_int on the given index"
|
19
|
-
fails "String#byteslice raises a TypeError if the given index is nil"
|
20
|
-
fails "String#byteslice raises a TypeError if the given index can't be converted to an Integer"
|
21
|
-
fails "String#byteslice with index, length returns the substring starting at the given index with the given length"
|
22
|
-
fails "String#byteslice with index, length always taints resulting strings when self is tainted"
|
23
|
-
fails "String#byteslice with index, length returns nil if the offset falls outside of self"
|
24
|
-
fails "String#byteslice with index, length returns nil if the length is negative"
|
25
|
-
fails "String#byteslice with index, length calls to_int on the given index and the given length"
|
26
|
-
fails "String#byteslice with index, length raises a TypeError when idx or length can't be converted to an integer"
|
27
|
-
fails "String#byteslice with index, length raises a TypeError when the given index or the given length is nil"
|
28
|
-
fails "String#byteslice with index, length returns subclass instances"
|
29
|
-
fails "String#byteslice with index, length handles repeated application"
|
30
|
-
fails "String#byteslice with Range returns the substring given by the offsets of the range"
|
31
|
-
fails "String#byteslice with Range returns nil if the beginning of the range falls outside of self"
|
32
|
-
fails "String#byteslice with Range returns an empty string if range.begin is inside self and > real end"
|
33
|
-
fails "String#byteslice with Range always taints resulting strings when self is tainted"
|
34
|
-
fails "String#byteslice with Range returns subclass instances"
|
35
|
-
fails "String#byteslice with Range calls to_int on range arguments"
|
36
|
-
fails "String#byteslice with Range works with Range subclasses"
|
37
|
-
fails "String#byteslice with Range handles repeated application"
|
38
|
-
|
39
|
-
fails "String#getbyte returns an Integer if given a valid index"
|
40
|
-
fails "String#getbyte starts indexing at 0"
|
23
|
+
fails "String#each_byte keeps iterating from the old position (to new string end) when self changes"
|
24
|
+
fails "String#each_byte passes each byte in self to the given block"
|
25
|
+
fails "String#each_byte when no block is given returned enumerator size should return the bytesize of the string"
|
26
|
+
fails "String#each_byte when no block is given returns an enumerator"
|
41
27
|
fails "String#getbyte counts from the end of the String if given a negative argument"
|
42
|
-
fails "String#getbyte returns an Integer between 0 and 255"
|
43
|
-
fails "String#getbyte regards a multi-byte character as having multiple bytes"
|
44
|
-
fails "String#getbyte mirrors the output of #bytes"
|
45
28
|
fails "String#getbyte interprets bytes relative to the String's encoding"
|
46
|
-
fails "String#getbyte
|
47
|
-
fails "String#getbyte regards the empty String as containing no bytes"
|
29
|
+
fails "String#getbyte mirrors the output of #bytes"
|
48
30
|
fails "String#getbyte raises a TypeError unless its argument can be coerced into an Integer"
|
49
|
-
|
50
|
-
fails "String#
|
51
|
-
fails "String#
|
52
|
-
fails "String#
|
53
|
-
|
31
|
+
fails "String#getbyte regards a multi-byte character as having multiple bytes"
|
32
|
+
fails "String#getbyte regards the empty String as containing no bytes"
|
33
|
+
fails "String#getbyte returns an Integer between 0 and 255"
|
34
|
+
fails "String#getbyte returns an Integer if given a valid index"
|
35
|
+
fails "String#getbyte returns nil for out-of-bound indexes"
|
36
|
+
fails "String#getbyte starts indexing at 0"
|
37
|
+
fails "String#slice with Range calls to_int on range arguments"
|
38
|
+
fails "String#split with Regexp includes all captures in the result array"
|
39
|
+
fails "String#to_c returns a complex number with 0 as the real part, 0 as the imaginary part for unrecognised Strings"
|
54
40
|
fails "String#to_c returns a Complex object"
|
55
|
-
fails "String#to_c understands integers"
|
56
|
-
fails "String#to_c understands negative integers"
|
57
|
-
fails "String#to_c understands fractions (numerator/denominator) for the real part"
|
58
|
-
fails "String#to_c understands fractions (numerator/denominator) for the imaginary part"
|
59
|
-
fails "String#to_c understands negative fractions (-numerator/denominator) for the real part"
|
60
|
-
fails "String#to_c understands negative fractions (-numerator/denominator) for the imaginary part"
|
61
|
-
fails "String#to_c understands floats (a.b) for the real part"
|
62
|
-
fails "String#to_c understands floats (a.b) for the imaginary part"
|
63
|
-
fails "String#to_c understands negative floats (-a.b) for the real part"
|
64
|
-
fails "String#to_c understands negative floats (-a.b) for the imaginary part"
|
65
|
-
fails "String#to_c understands an integer followed by 'i' to mean that integer is the imaginary part"
|
66
|
-
fails "String#to_c understands a negative integer followed by 'i' to mean that negative integer is the imaginary part"
|
67
|
-
fails "String#to_c understands an 'i' by itself as denoting a complex number with an imaginary part of 1"
|
68
|
-
fails "String#to_c understands a '-i' by itself as denoting a complex number with an imaginary part of -1"
|
69
41
|
fails "String#to_c understands 'a+bi' to mean a complex number with 'a' as the real part, 'b' as the imaginary"
|
70
42
|
fails "String#to_c understands 'a-bi' to mean a complex number with 'a' as the real part, '-b' as the imaginary"
|
71
|
-
fails "String#to_c understands
|
43
|
+
fails "String#to_c understands a '-i' by itself as denoting a complex number with an imaginary part of -1"
|
44
|
+
fails "String#to_c understands a negative integer followed by 'i' to mean that negative integer is the imaginary part"
|
45
|
+
fails "String#to_c understands an 'i' by itself as denoting a complex number with an imaginary part of 1"
|
46
|
+
fails "String#to_c understands an integer followed by 'i' to mean that integer is the imaginary part"
|
47
|
+
fails "String#to_c understands floats (a.b) for the imaginary part"
|
48
|
+
fails "String#to_c understands floats (a.b) for the real part"
|
49
|
+
fails "String#to_c understands fractions (numerator/denominator) for the imaginary part"
|
50
|
+
fails "String#to_c understands fractions (numerator/denominator) for the real part"
|
51
|
+
fails "String#to_c understands integers"
|
52
|
+
fails "String#to_c understands negative floats (-a.b) for the imaginary part"
|
53
|
+
fails "String#to_c understands negative floats (-a.b) for the real part"
|
54
|
+
fails "String#to_c understands negative fractions (-numerator/denominator) for the imaginary part"
|
55
|
+
fails "String#to_c understands negative fractions (-numerator/denominator) for the real part"
|
56
|
+
fails "String#to_c understands negative integers"
|
57
|
+
fails "String#to_c understands negative scientific notation for the imaginary part"
|
58
|
+
fails "String#to_c understands negative scientific notation for the real and imaginary part in the same String"
|
72
59
|
fails "String#to_c understands negative scientific notation for the real part"
|
73
60
|
fails "String#to_c understands scientific notation for the imaginary part"
|
74
|
-
fails "String#to_c understands negative scientific notation for the imaginary part"
|
75
61
|
fails "String#to_c understands scientific notation for the real and imaginary part in the same String"
|
76
|
-
fails "String#to_c understands
|
77
|
-
fails "String#to_c returns a complex number with 0 as the real part, 0 as the imaginary part for unrecognised Strings"
|
78
|
-
|
79
|
-
fails "String#to_r returns a Rational object"
|
80
|
-
fails "String#to_r returns (0/1) for the empty String"
|
81
|
-
fails "String#to_r returns (n/1) for a String starting with a decimal _n_"
|
82
|
-
fails "String#to_r ignores trailing characters"
|
83
|
-
fails "String#to_r ignores leading spaces"
|
62
|
+
fails "String#to_c understands scientific notation for the real part"
|
84
63
|
fails "String#to_r does not ignore arbitrary, non-numeric leading characters"
|
85
|
-
fails "String#to_r treats leading hypens as minus signs"
|
86
64
|
fails "String#to_r does not treat a leading period without a numeric prefix as a decimal point"
|
87
|
-
fails "String#to_r
|
65
|
+
fails "String#to_r ignores leading spaces"
|
66
|
+
fails "String#to_r ignores trailing characters"
|
88
67
|
fails "String#to_r ignores underscores between numbers"
|
89
|
-
fails "String#to_r understands a forward slash as separating the numerator from the denominator"
|
90
68
|
fails "String#to_r returns (0/1) for Strings it can't parse"
|
91
|
-
|
92
|
-
fails "String#
|
93
|
-
fails "String#
|
94
|
-
fails "String#
|
95
|
-
fails "String#
|
96
|
-
fails "String#
|
97
|
-
fails "String#
|
98
|
-
fails "String#dump returns a string with # not escaped when followed by any other character"
|
99
|
-
fails "String#dump returns a string with printable non-alphanumeric characters unescaped"
|
100
|
-
fails "String#dump returns a string with numeric characters unescaped"
|
101
|
-
fails "String#dump returns a string with upper-case alpha characters unescaped"
|
102
|
-
fails "String#dump returns a string with lower-case alpha characters unescaped"
|
103
|
-
fails "String#dump returns a string with non-printing ASCII characters replaced by \\x notation"
|
104
|
-
fails "String#dump returns a string with non-printing single-byte UTF-8 characters replaced by \\x notation"
|
105
|
-
fails "String#dump returns a string with multi-byte UTF-8 characters replaced by \\u{} notation with lower-case hex digits"
|
106
|
-
fails "String#dump includes .force_encoding(name) if the encoding isn't ASCII compatible"
|
69
|
+
fails "String#to_r returns (0/1) for the empty String"
|
70
|
+
fails "String#to_r returns (n/1) for a String starting with a decimal _n_"
|
71
|
+
fails "String#to_r returns a Rational object"
|
72
|
+
fails "String#to_r treats leading hypens as minus signs"
|
73
|
+
fails "String#to_r understands a forward slash as separating the numerator from the denominator"
|
74
|
+
fails "String#to_r understands decimal points"
|
75
|
+
fails "String#[] with Range calls to_int on range arguments"
|
107
76
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
opal_filter "StringScanner" do
|
2
|
+
fails "StringScanner#<< concatenates the given argument to self and returns self"
|
3
|
+
fails "StringScanner#<< raises a TypeError if the given argument can't be converted to a String"
|
4
|
+
fails "StringScanner#<< when passed a Fixnum doesn't call to_int on the argument"
|
5
|
+
fails "StringScanner#<< when passed a Fixnum raises a TypeError"
|
6
|
+
fails "StringScanner#clear set the scan pointer to the end of the string and clear matching data."
|
7
|
+
fails "StringScanner#clear warns in verbose mode that the method is obsolete"
|
8
|
+
fails "StringScanner#concat concatenates the given argument to self and returns self"
|
9
|
+
fails "StringScanner#concat raises a TypeError if the given argument can't be converted to a String"
|
10
|
+
fails "StringScanner#concat when passed a Fixnum doesn't call to_int on the argument"
|
11
|
+
fails "StringScanner#concat when passed a Fixnum raises a TypeError"
|
12
|
+
fails "StringScanner#dup copies previous match state"
|
13
|
+
fails "StringScanner#empty? Returns false if the scan pointer is not at the end of the string"
|
14
|
+
fails "StringScanner#empty? Returns true if the scan pointer is at the end of the string"
|
15
|
+
fails "StringScanner#empty? warns in verbose mode that the method is obsolete"
|
16
|
+
fails "StringScanner#getbyte is not multi-byte character sensitive"
|
17
|
+
fails "StringScanner#getbyte returns an instance of String when passed a String subclass"
|
18
|
+
fails "StringScanner#getbyte returns nil at the end of the string"
|
19
|
+
fails "StringScanner#getbyte scans one byte and returns it"
|
20
|
+
fails "StringScanner#getbyte taints the returned String if the input was tainted"
|
21
|
+
fails "StringScanner#getbyte warns in verbose mode that the method is obsolete"
|
22
|
+
fails "StringScanner#getch is multi-byte character sensitive"
|
23
|
+
fails "StringScanner#getch returns an instance of String when passed a String subclass"
|
24
|
+
fails "StringScanner#getch taints the returned String if the input was tainted"
|
25
|
+
fails "StringScanner#initialize converts the argument into a string using #to_str"
|
26
|
+
fails "StringScanner#initialize is a private method"
|
27
|
+
fails "StringScanner#inspect returns a string that represents the StringScanner object"
|
28
|
+
fails "StringScanner#matched returns an instance of String when passed a String subclass"
|
29
|
+
fails "StringScanner#matched returns nil if there's no match"
|
30
|
+
fails "StringScanner#matched returns the last matched string"
|
31
|
+
fails "StringScanner#matched taints the returned String if the input was tainted"
|
32
|
+
fails "StringScanner#matched? returns false if there's no match"
|
33
|
+
fails "StringScanner#matched? returns true if the last match was successful"
|
34
|
+
fails "StringScanner#matched_size returns nil if there was no recent match"
|
35
|
+
fails "StringScanner#matched_size returns the size of the most recent match"
|
36
|
+
fails "StringScanner#peek raises a ArgumentError when the passed argument is negative"
|
37
|
+
fails "StringScanner#peek raises a RangeError when the passed argument is a Bignum"
|
38
|
+
fails "StringScanner#peek returns an instance of String when passed a String subclass"
|
39
|
+
fails "StringScanner#peek taints the returned String if the input was tainted"
|
40
|
+
fails "StringScanner#peep raises a ArgumentError when the passed argument is negative"
|
41
|
+
fails "StringScanner#peep raises a RangeError when the passed argument is a Bignum"
|
42
|
+
fails "StringScanner#peep returns an empty string when the passed argument is zero"
|
43
|
+
fails "StringScanner#peep returns an instance of String when passed a String subclass"
|
44
|
+
fails "StringScanner#peep returns at most the specified number of characters from the current position"
|
45
|
+
fails "StringScanner#peep taints the returned String if the input was tainted"
|
46
|
+
fails "StringScanner#peep warns in verbose mode that the method is obsolete"
|
47
|
+
fails "StringScanner#pointer returns 0 in the reset position"
|
48
|
+
fails "StringScanner#pointer returns the length of the string in the terminate position"
|
49
|
+
fails "StringScanner#pointer returns the position of the scan pointer"
|
50
|
+
fails "StringScanner#pointer= modify the scan pointer"
|
51
|
+
fails "StringScanner#pointer= positions from the end if the argument is negative"
|
52
|
+
fails "StringScanner#pointer= raises a RangeError if position too far backward"
|
53
|
+
fails "StringScanner#pointer= raises a RangeError when the passed argument is out of range"
|
54
|
+
fails "StringScanner#pos returns the position of the scan pointer"
|
55
|
+
fails "StringScanner#pos= raises a RangeError if position too far backward"
|
56
|
+
fails "StringScanner#pos= raises a RangeError when the passed argument is out of range"
|
57
|
+
fails "StringScanner#restsize is equivalent to rest.size"
|
58
|
+
fails "StringScanner#restsize Returns the length of the rest of the string"
|
59
|
+
fails "StringScanner#restsize warns in verbose mode that the method is obsolete"
|
60
|
+
fails "StringScanner#scan raises a TypeError if pattern isn't a Regexp"
|
61
|
+
fails "StringScanner#scan_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true"
|
62
|
+
fails "StringScanner#scan_full returns the matched string if the third argument is true"
|
63
|
+
fails "StringScanner#scan_full returns the number of bytes advanced and advances the scan pointer if the second argument is true"
|
64
|
+
fails "StringScanner#scan_full returns the number of bytes advanced"
|
65
|
+
fails "StringScanner#search_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true"
|
66
|
+
fails "StringScanner#search_full returns the matched string if the third argument is true"
|
67
|
+
fails "StringScanner#search_full returns the number of bytes advanced and advances the scan pointer if the second argument is true"
|
68
|
+
fails "StringScanner#search_full returns the number of bytes advanced"
|
69
|
+
fails "StringScanner#string returns the string being scanned"
|
70
|
+
fails "StringScanner#string= changes the string being scanned to the argument and resets the scanner"
|
71
|
+
fails "StringScanner#string= converts the argument into a string using #to_str"
|
72
|
+
fails "StringScanner#unscan raises a ScanError when the previous match had failed"
|
73
|
+
fails "StringScanner#unscan set the scan pointer to the previous position"
|
74
|
+
fails "StringScanner#[] calls to_int on the given index"
|
75
|
+
fails "StringScanner#[] raises a IndexError when there's no named capture"
|
76
|
+
fails "StringScanner#[] raises a TypeError if the given index is nil"
|
77
|
+
fails "StringScanner#[] raises a TypeError when a Range is as argument"
|
78
|
+
fails "StringScanner#[] returns named capture"
|
79
|
+
fails "StringScanner.must_C_version returns self"
|
80
|
+
end
|