opal 0.4.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.gitmodules +3 -0
- data/.travis.yml +8 -0
- data/CONTRIBUTING.md +46 -2
- data/Gemfile +17 -0
- data/README.md +13 -4
- data/Rakefile +22 -119
- data/bin/opal +11 -2
- data/bin/opal-repl +71 -0
- data/corelib/array.rb +554 -356
- data/corelib/basic_object.rb +22 -18
- data/corelib/boolean.rb +15 -6
- data/corelib/class.rb +12 -6
- data/corelib/comparable.rb +40 -9
- data/corelib/encoding.rb +164 -0
- data/corelib/enumerable.rb +532 -300
- data/corelib/enumerator.rb +31 -6
- data/corelib/error.rb +14 -3
- data/corelib/hash.rb +108 -97
- data/corelib/io.rb +30 -0
- data/corelib/kernel.rb +151 -82
- data/corelib/main.rb +7 -0
- data/corelib/match_data.rb +118 -0
- data/corelib/method.rb +58 -0
- data/corelib/module.rb +145 -77
- data/corelib/native.rb +144 -22
- data/corelib/nil_class.rb +2 -0
- data/corelib/numeric.rb +259 -61
- data/corelib/opal.rb +43 -28
- data/corelib/proc.rb +21 -9
- data/corelib/range.rb +42 -23
- data/corelib/regexp.rb +51 -9
- data/corelib/runtime.js +470 -129
- data/corelib/string.rb +170 -246
- data/corelib/struct.rb +13 -1
- data/corelib/time.rb +414 -43
- data/doc/compiler.md +42 -0
- data/doc/compiler_options.md +5 -0
- data/doc/examples/node_http_server.rb +49 -0
- data/doc/external_libraries.md +9 -0
- data/doc/generated_javascript.md +272 -0
- data/doc/home.md +17 -0
- data/doc/method_missing.md +58 -0
- data/doc/static_applications.md +60 -0
- data/doc/using_ruby_from_javascript.md +18 -0
- data/doc/using_sprockets.md +65 -0
- data/lib/opal.rb +18 -15
- data/lib/opal/builder.rb +26 -9
- data/lib/opal/cli.rb +143 -90
- data/lib/opal/cli_options.rb +19 -13
- data/lib/opal/compiler.rb +307 -0
- data/lib/opal/erb.rb +3 -3
- data/lib/opal/fragment.rb +34 -0
- data/lib/opal/nodes.rb +25 -0
- data/lib/opal/nodes/arglist.rb +56 -0
- data/lib/opal/nodes/array.rb +54 -0
- data/lib/opal/nodes/base.rb +150 -0
- data/lib/opal/nodes/base_scope.rb +11 -0
- data/lib/opal/nodes/call.rb +195 -0
- data/lib/opal/nodes/call_special.rb +153 -0
- data/lib/opal/nodes/case.rb +96 -0
- data/lib/opal/nodes/class.rb +43 -0
- data/lib/opal/nodes/constants.rb +91 -0
- data/lib/opal/nodes/def.rb +157 -0
- data/lib/opal/nodes/defined.rb +113 -0
- data/lib/opal/nodes/definitions.rb +182 -0
- data/lib/opal/nodes/hash.rb +67 -0
- data/lib/opal/nodes/helpers.rb +105 -0
- data/lib/opal/nodes/if.rb +60 -0
- data/lib/opal/nodes/iter.rb +118 -0
- data/lib/opal/nodes/literal.rb +193 -0
- data/lib/opal/nodes/logic.rb +211 -0
- data/lib/opal/nodes/masgn.rb +62 -0
- data/lib/opal/nodes/module.rb +46 -0
- data/lib/opal/nodes/rescue.rb +134 -0
- data/lib/opal/nodes/singleton_class.rb +26 -0
- data/lib/opal/nodes/super.rb +97 -0
- data/lib/opal/nodes/top.rb +63 -0
- data/lib/opal/nodes/variables.rb +155 -0
- data/lib/opal/nodes/while.rb +65 -0
- data/lib/opal/nodes/yield.rb +84 -0
- data/lib/opal/parser.rb +294 -2169
- data/lib/opal/parser/grammar.rb +5326 -0
- data/lib/opal/{grammar.y → parser/grammar.y} +180 -113
- data/lib/opal/parser/keywords.rb +64 -0
- data/lib/opal/{lexer.rb → parser/lexer.rb} +278 -327
- data/lib/opal/{lexer_scope.rb → parser/parser_scope.rb} +2 -5
- data/lib/opal/parser/sexp.rb +63 -0
- data/lib/opal/source_map.rb +6 -5
- data/lib/opal/target_scope.rb +15 -17
- data/lib/opal/version.rb +1 -1
- data/mri_spec/cli_spec.rb +67 -6
- data/opal.gemspec +4 -4
- data/spec/config.ru +2 -1
- data/spec/corelib/enumerable/all_break_spec.rb +5 -0
- data/spec/corelib/enumerable/any_break_spec.rb +5 -0
- data/spec/corelib/enumerable/collect_break_spec.rb +13 -0
- data/spec/corelib/enumerable/count_break_spec.rb +5 -0
- data/spec/corelib/enumerable/detect_break_spec.rb +5 -0
- data/spec/corelib/enumerable/drop_while_break_spec.rb +5 -0
- data/spec/corelib/enumerable/each_slice_break.rb +6 -0
- data/spec/corelib/enumerable/each_with_index_break_spec.rb +5 -0
- data/spec/corelib/enumerable/each_with_object_break_spec.rb +5 -0
- data/spec/corelib/enumerable/find_all_break_spec.rb +5 -0
- data/spec/corelib/enumerable/find_index_break_spec.rb +5 -0
- data/spec/corelib/enumerable/grep_break_spec.rb +5 -0
- data/spec/corelib/enumerable/max_break_spec.rb +5 -0
- data/spec/corelib/enumerable/max_by_break_spec.rb +5 -0
- data/spec/corelib/enumerable/min_break_spec.rb +5 -0
- data/spec/corelib/enumerable/min_by_break_spec.rb +5 -0
- data/spec/corelib/enumerable/none_break_spec.rb +5 -0
- data/spec/corelib/enumerable/one_break_spec.rb +5 -0
- data/spec/corelib/enumerable/reduce_break_spec.rb +5 -0
- data/spec/corelib/enumerable/take_while_break_spec.rb +5 -0
- data/spec/{rubyspec → corelib}/fixtures/class.rb +0 -0
- data/spec/{rubyspec → corelib}/fixtures/class_variables.rb +0 -0
- data/spec/{rubyspec → corelib}/fixtures/constants.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/Array_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/block_given_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/class_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/define_singleton_method_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/equal_value_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/extend_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/format_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/freeze_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/instance_eval_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/instance_variable_defined_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/instance_variable_get_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/instance_variable_set_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/loop_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/match_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/method_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/methods_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/nil_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/p_spec.rb +8 -6
- data/spec/{opal → corelib}/kernel/printf_spec.rb +4 -2
- data/spec/{opal → corelib}/kernel/proc_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/rand_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/respond_to_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/kernel/send_spec.rb +0 -0
- data/spec/{opal → corelib}/kernel/sprintf_spec.rb +0 -0
- data/spec/corelib/kernel/warn_spec.rb +83 -0
- data/spec/{rubyspec → corelib}/language/block_spec.rb +17 -18
- data/spec/{rubyspec → corelib}/language/fixtures/array.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/block.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/break.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/ensure.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/literal_lambda.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/metaclass.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/module.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/next.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/return.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/send.rb +1 -1
- data/spec/{rubyspec → corelib}/language/fixtures/send_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/super.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/variables.rb +0 -0
- data/spec/{rubyspec → corelib}/language/fixtures/yield.rb +0 -0
- data/spec/{rubyspec → corelib}/language/numbers_spec.rb +0 -2
- data/spec/{rubyspec → corelib}/language/predefined_spec.rb +0 -0
- data/spec/{rubyspec → corelib}/language/proc_spec.rb +0 -2
- data/spec/{rubyspec → corelib}/language/regexp_spec.rb +0 -0
- data/spec/{rubyspec → corelib}/language/send_spec.rb +6 -7
- data/spec/{rubyspec → corelib}/language/string_spec.rb +0 -0
- data/spec/{rubyspec → corelib}/language/symbol_spec.rb +0 -0
- data/spec/{rubyspec → corelib}/language/variables_spec.rb +1 -2
- data/spec/{rubyspec → corelib}/language/versions/array_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/block_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/break_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/case_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/hash_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/literal_lambda_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/not_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/send_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/symbol_1.9.rb +0 -0
- data/spec/{rubyspec → corelib}/language/versions/variables_1.9.rb +1 -1
- data/spec/corelib/module/alias_method_spec.rb +28 -0
- data/spec/{opal → corelib}/module/ancestors_spec.rb +0 -0
- data/spec/{opal → corelib}/module/append_features_spec.rb +0 -0
- data/spec/corelib/module/attr_accessor_spec.rb +26 -0
- data/spec/{rubyspec/core → corelib}/module/const_defined_spec.rb +1 -2
- data/spec/{rubyspec/core → corelib}/module/const_get_spec.rb +1 -2
- data/spec/{rubyspec/core → corelib}/module/const_missing_spec.rb +1 -2
- data/spec/{rubyspec/core → corelib}/module/const_set_spec.rb +1 -2
- data/spec/{opal → corelib}/module/constants_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/module/fixtures/classes.rb +0 -0
- data/spec/{rubyspec/core → corelib}/module/method_defined_spec.rb +0 -1
- data/spec/{opal → corelib}/module/module_function_spec.rb +0 -2
- data/spec/corelib/module/name_spec.rb +52 -0
- data/spec/{rubyspec/core → corelib}/module/public_method_defined_spec.rb +0 -1
- data/spec/{rubyspec/core → corelib}/module/remove_const_spec.rb +0 -1
- data/spec/{rubyspec/core → corelib}/module/undef_method_spec.rb +0 -1
- data/spec/{opal → corelib}/native/alias_native_spec.rb +7 -0
- data/spec/{opal → corelib}/native/each_spec.rb +2 -5
- data/spec/{opal → corelib}/native/element_reference_spec.rb +0 -0
- data/spec/{rubyspec/core/hash/to_native_spec.rb → corelib/native/ext_spec.rb} +0 -0
- data/spec/corelib/native/initialize_spec.rb +17 -0
- data/spec/{opal → corelib}/native/method_missing_spec.rb +0 -0
- data/spec/corelib/native/new_spec.rb +6 -0
- data/spec/{rubyspec/core → corelib}/numeric/abs_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/bit_and_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/bit_or_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/bit_xor_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/ceil_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/chr_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/comparison_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/complement_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/divide_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/downto_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/eql_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/equal_value_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/even_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/exponent_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/floor_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/gt_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/gte_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/integer_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/left_shift_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/lt_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/lte_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/magnitude_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/minus_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/modulo_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/multiply_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/next_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/odd_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/ord_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/plus_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/pred_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/right_shift_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/step_spec.rb +0 -3
- data/spec/{rubyspec/core → corelib}/numeric/succ_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/times_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/to_f_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/to_i_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/to_json_spec.rb +0 -0
- data/spec/corelib/numeric/to_s_spec.rb +26 -0
- data/spec/{rubyspec/core → corelib}/numeric/uminus_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/upto_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/numeric/zero_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/proc/call_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/proc/element_reference_spec.rb +0 -0
- data/spec/{opal → corelib}/proc/proc_tricks_spec.rb +0 -0
- data/spec/corelib/runtime/begin_spec.rb +39 -0
- data/spec/{opal → corelib}/runtime/block_send_spec.rb +0 -0
- data/spec/{opal/language → corelib/runtime}/block_spec.rb +10 -0
- data/spec/corelib/runtime/bridged_classes_spec.rb +64 -0
- data/spec/{opal → corelib/runtime}/constants_spec.rb +0 -0
- data/spec/{opal → corelib}/runtime/eval_spec.rb +0 -0
- data/spec/{opal → corelib}/runtime/main_methods_spec.rb +0 -0
- data/spec/{opal → corelib/runtime}/method_missing_spec.rb +0 -0
- data/spec/corelib/runtime/method_spec.rb +31 -0
- data/spec/corelib/runtime/paren_spec.rb +14 -0
- data/spec/{opal/language → corelib/runtime}/rescue_spec.rb +11 -0
- data/spec/{opal/language → corelib/runtime}/return_spec.rb +0 -0
- data/spec/{opal → corelib}/runtime/send_spec.rb +0 -0
- data/spec/{opal/language → corelib/runtime}/singleton_class_spec.rb +0 -0
- data/spec/{opal/language → corelib/runtime}/super_spec.rb +113 -0
- data/spec/{opal/language → corelib/runtime}/variables_spec.rb +0 -0
- data/spec/{opal → corelib}/source_map_spec.rb +3 -3
- data/spec/{rubyspec/core → corelib}/string/chop_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/chr_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/clone_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/comparison_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/dup_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/element_reference_spec.rb +0 -1
- data/spec/{rubyspec/core → corelib}/string/fixtures/classes.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/format_spec.rb +0 -0
- data/spec/{opal → corelib}/string/freeze_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/gsub_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/lines_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/ljust_spec.rb +0 -1
- data/spec/{rubyspec/core → corelib}/string/lstrip_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/match_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/next_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/ord_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/partition_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/rindex_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/rjust_spec.rb +0 -1
- data/spec/{rubyspec/core → corelib}/string/rstrip_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/scan_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/slice_spec.rb +1 -2
- data/spec/{rubyspec/core → corelib}/string/split_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/strip_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/sub_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/succ_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/sum_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/to_f_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/to_i_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/tr_s_spec.rb +0 -0
- data/spec/{rubyspec/core → corelib}/string/tr_spec.rb +0 -0
- data/spec/filters/bugs/array.rb +236 -4
- data/spec/filters/bugs/basic_object.rb +4 -0
- data/spec/filters/bugs/class.rb +4 -0
- data/spec/filters/bugs/enumerable.rb +58 -0
- data/spec/filters/bugs/enumerator.rb +6 -0
- data/spec/filters/bugs/hash.rb +146 -0
- data/spec/filters/bugs/kernel.rb +10 -0
- data/spec/filters/bugs/language.rb +366 -0
- data/spec/filters/bugs/module.rb +14 -0
- data/spec/filters/bugs/regexp.rb +7 -0
- data/spec/filters/bugs/set.rb +7 -0
- data/spec/filters/bugs/{singleton/instance.rb → singleton.rb} +3 -1
- data/spec/filters/bugs/string.rb +37 -0
- data/spec/filters/bugs/stringscanner.rb +18 -0
- data/spec/filters/bugs/struct.rb +11 -0
- data/spec/filters/bugs/symbol.rb +5 -0
- data/spec/filters/bugs/time.rb +28 -0
- data/spec/filters/bugs/unknown.rb +11 -0
- data/spec/filters/unsupported/array_subclasses.rb +32 -0
- data/spec/filters/unsupported/encoding.rb +14 -0
- data/spec/filters/unsupported/float.rb +4 -0
- data/spec/filters/unsupported/frozen.rb +57 -0
- data/spec/filters/unsupported/hash_compare_by_identity.rb +16 -0
- data/spec/filters/unsupported/immutable_strings.rb +6 -0
- data/spec/filters/unsupported/mutable_strings.rb +49 -0
- data/spec/filters/unsupported/private_methods.rb +26 -0
- data/spec/filters/{mspec → unsupported}/ruby_exe.rb +0 -0
- data/spec/filters/unsupported/string_subclasses.rb +8 -0
- data/spec/filters/unsupported/tainted.rb +46 -0
- data/spec/filters/unsupported/time.rb +21 -0
- data/spec/filters/unsupported/trusted.rb +26 -0
- data/spec/opal/{parser → compiler}/irb_spec.rb +9 -9
- data/spec/{parser → opal/parser}/alias_spec.rb +0 -0
- data/spec/{parser → opal/parser}/and_spec.rb +0 -0
- data/spec/{parser → opal/parser}/array_spec.rb +0 -0
- data/spec/{parser → opal/parser}/attrasgn_spec.rb +0 -0
- data/spec/{parser → opal/parser}/begin_spec.rb +0 -0
- data/spec/{parser → opal/parser}/block_spec.rb +0 -0
- data/spec/{parser → opal/parser}/break_spec.rb +0 -0
- data/spec/{parser → opal/parser}/call_spec.rb +33 -8
- data/spec/{parser → opal/parser}/class_spec.rb +0 -0
- data/spec/{parser → opal/parser}/const_spec.rb +0 -0
- data/spec/{parser → opal/parser}/cvar_spec.rb +0 -0
- data/spec/{parser → opal/parser}/def_spec.rb +17 -17
- data/spec/{parser → opal/parser}/false_spec.rb +0 -0
- data/spec/{parser → opal/parser}/file_spec.rb +0 -0
- data/spec/{parser → opal/parser}/gvar_spec.rb +0 -0
- data/spec/{parser → opal/parser}/hash_spec.rb +0 -0
- data/spec/opal/parser/heredoc_spec.rb +30 -0
- data/spec/{parser → opal/parser}/iasgn_spec.rb +0 -0
- data/spec/{parser → opal/parser}/if_spec.rb +0 -0
- data/spec/{parser → opal/parser}/int_spec.rb +0 -0
- data/spec/opal/parser/iter_spec.rb +59 -0
- data/spec/{parser → opal/parser}/ivar_spec.rb +0 -0
- data/spec/opal/parser/lambda_spec.rb +64 -0
- data/spec/{parser → opal/parser}/lasgn_spec.rb +0 -0
- data/spec/{parser → opal/parser}/line_spec.rb +0 -0
- data/spec/{parser → opal/parser}/lvar_spec.rb +6 -6
- data/spec/{parser → opal/parser}/masgn_spec.rb +0 -0
- data/spec/{parser → opal/parser}/module_spec.rb +0 -0
- data/spec/{parser → opal/parser}/nil_spec.rb +0 -0
- data/spec/{parser → opal/parser}/not_spec.rb +0 -0
- data/spec/{parser → opal/parser}/nth_ref_spec.rb +0 -0
- data/spec/{parser → opal/parser}/op_asgn1_spec.rb +0 -0
- data/spec/{parser → opal/parser}/op_asgn2_spec.rb +0 -0
- data/spec/{parser → opal/parser}/or_spec.rb +0 -0
- data/spec/{parser → opal/parser}/parse_spec.rb +17 -17
- data/spec/{parser → opal/parser}/regexp_spec.rb +0 -0
- data/spec/{parser → opal/parser}/return_spec.rb +0 -0
- data/spec/{parser → opal/parser}/sclass_spec.rb +0 -0
- data/spec/{parser → opal/parser}/self_spec.rb +0 -0
- data/spec/{parser → opal/parser}/str_spec.rb +1 -12
- data/spec/{parser → opal/parser}/string_spec.rb +0 -0
- data/spec/opal/parser/super_spec.rb +20 -0
- data/spec/{parser → opal/parser}/true_spec.rb +0 -0
- data/spec/{parser → opal/parser}/undef_spec.rb +0 -0
- data/spec/{parser → opal/parser}/unless_spec.rb +0 -0
- data/spec/{parser → opal/parser}/while_spec.rb +0 -0
- data/spec/{parser → opal/parser}/xstr_spec.rb +2 -2
- data/spec/{parser → opal/parser}/yield_spec.rb +0 -0
- data/spec/ospec/main.rb.erb +1 -13
- data/spec/ospec/mspec_fixes.rb +87 -0
- data/spec/ospec/runner.rb +188 -0
- data/spec/rubyspecs +351 -0
- data/spec/spec_helper.rb +8 -198
- data/spec/{opal → stdlib}/erb/erb_spec.rb +3 -3
- data/spec/{opal → stdlib}/erb/inline_block.opalerb +0 -0
- data/spec/{opal → stdlib}/erb/quoted.opalerb +0 -0
- data/spec/{opal → stdlib}/erb/simple.opalerb +0 -0
- data/spec/stdlib/json/ext_spec.rb +48 -0
- data/spec/{opal → stdlib}/json/parse_spec.rb +0 -0
- data/spec/stdlib/template/paths_spec.rb +10 -0
- data/stdlib/delegate.rb +29 -0
- data/stdlib/dir.rb +5 -0
- data/stdlib/file.rb +7 -0
- data/stdlib/json.rb +82 -27
- data/stdlib/opal-parser.rb +46 -0
- data/stdlib/opal-source-maps.js.erb +1 -1
- data/stdlib/pathname.rb +31 -0
- data/stdlib/{racc.rb → racc/parser.rb} +0 -0
- data/stdlib/securerandom.rb +12 -0
- data/stdlib/set.rb +89 -0
- data/stdlib/stringio.rb +12 -4
- data/stdlib/strscan.rb +19 -0
- data/stdlib/template.rb +4 -0
- data/stdlib/thread.rb +20 -0
- data/tasks/mspec.rake +147 -0
- metadata +650 -1266
- data/lib/opal/core_ext.rb +0 -5
- data/lib/opal/grammar.rb +0 -5137
- data/lib/opal/grammar_helpers.rb +0 -364
- data/lib/opal/require_parser.rb +0 -77
- data/spec/filters/bugs/alias.rb +0 -6
- data/spec/filters/bugs/ancestors.rb +0 -4
- data/spec/filters/bugs/array/combination.rb +0 -11
- data/spec/filters/bugs/array/count.rb +0 -3
- data/spec/filters/bugs/array/delete_if.rb +0 -3
- data/spec/filters/bugs/array/drop.rb +0 -3
- data/spec/filters/bugs/array/drop_while.rb +0 -5
- data/spec/filters/bugs/array/eql.rb +0 -3
- data/spec/filters/bugs/array/flatten.rb +0 -9
- data/spec/filters/bugs/array/minus.rb +0 -5
- data/spec/filters/bugs/array/multipliy.rb +0 -9
- data/spec/filters/bugs/array/new.rb +0 -3
- data/spec/filters/bugs/array/pop.rb +0 -6
- data/spec/filters/bugs/array/rassoc.rb +0 -4
- data/spec/filters/bugs/array/rindex.rb +0 -6
- data/spec/filters/bugs/array/select.rb +0 -3
- data/spec/filters/bugs/array/shift.rb +0 -7
- data/spec/filters/bugs/array/shuffle.rb +0 -11
- data/spec/filters/bugs/array/slice.rb +0 -7
- data/spec/filters/bugs/array/take.rb +0 -3
- data/spec/filters/bugs/array/to_a.rb +0 -3
- data/spec/filters/bugs/array/try_convert.rb +0 -7
- data/spec/filters/bugs/array/uniq.rb +0 -10
- data/spec/filters/bugs/array/zip.rb +0 -4
- data/spec/filters/bugs/array_delete.rb +0 -4
- data/spec/filters/bugs/array_fetch.rb +0 -3
- data/spec/filters/bugs/array_first.rb +0 -3
- data/spec/filters/bugs/array_flatten.rb +0 -14
- data/spec/filters/bugs/array_intersection.rb +0 -5
- data/spec/filters/bugs/array_join.rb +0 -6
- data/spec/filters/bugs/break.rb +0 -10
- data/spec/filters/bugs/case.rb +0 -4
- data/spec/filters/bugs/coerce_integer.rb +0 -9
- data/spec/filters/bugs/enumerable_sort_by.rb +0 -3
- data/spec/filters/bugs/kernel/instance_variables.rb +0 -3
- data/spec/filters/bugs/kernel/rand.rb +0 -4
- data/spec/filters/bugs/language/array.rb +0 -3
- data/spec/filters/bugs/language/block.rb +0 -6
- data/spec/filters/bugs/language/break.rb +0 -3
- data/spec/filters/bugs/language/class.rb +0 -12
- data/spec/filters/bugs/language/class_variables.rb +0 -12
- data/spec/filters/bugs/language/def.rb +0 -27
- data/spec/filters/bugs/language/defined.rb +0 -3
- data/spec/filters/bugs/language/ensure.rb +0 -4
- data/spec/filters/bugs/language/execution.rb +0 -4
- data/spec/filters/bugs/language/for.rb +0 -18
- data/spec/filters/bugs/language/if.rb +0 -13
- data/spec/filters/bugs/language/loop.rb +0 -4
- data/spec/filters/bugs/language/metaclass.rb +0 -14
- data/spec/filters/bugs/language/module.rb +0 -6
- data/spec/filters/bugs/language/next.rb +0 -3
- data/spec/filters/bugs/language/or.rb +0 -3
- data/spec/filters/bugs/language/order.rb +0 -4
- data/spec/filters/bugs/language/precedence.rb +0 -10
- data/spec/filters/bugs/language/proc.rb +0 -24
- data/spec/filters/bugs/language/redo.rb +0 -5
- data/spec/filters/bugs/language/rescue.rb +0 -9
- data/spec/filters/bugs/language/retry.rb +0 -5
- data/spec/filters/bugs/language/send.rb +0 -10
- data/spec/filters/bugs/language/super.rb +0 -9
- data/spec/filters/bugs/language/until.rb +0 -8
- data/spec/filters/bugs/language/variables.rb +0 -37
- data/spec/filters/bugs/language/while.rb +0 -6
- data/spec/filters/bugs/language/yield.rb +0 -5
- data/spec/filters/bugs/module/class_variables.rb +0 -6
- data/spec/filters/bugs/module/method_defined.rb +0 -6
- data/spec/filters/bugs/public_methods.rb +0 -4
- data/spec/filters/bugs/return.rb +0 -7
- data/spec/filters/bugs/source_map.rb +0 -3
- data/spec/filters/bugs/string/center.rb +0 -4
- data/spec/filters/bugs/string/lines.rb +0 -3
- data/spec/filters/mspec/mocks.rb +0 -3
- data/spec/filters/mspec/should_receive.rb +0 -5
- data/spec/filters/parser/block_args.rb +0 -51
- data/spec/mspec/guards/block_device.rb +0 -0
- data/spec/mspec/guards/endian.rb +0 -0
- data/spec/mspec/helpers/environment.rb +0 -0
- data/spec/mspec/helpers/language_version.rb +0 -0
- data/spec/mspec/helpers/tmp.rb +0 -0
- data/spec/opal/array/element_reference_spec.rb +0 -206
- data/spec/opal/array/equal_value_spec.rb +0 -19
- data/spec/opal/array/fill_spec.rb +0 -26
- data/spec/opal/array/reduce_spec.rb +0 -31
- data/spec/opal/array/to_json_spec.rb +0 -9
- data/spec/opal/basic_object/send_spec.rb +0 -28
- data/spec/opal/boolean/singleton_class_spec.rb +0 -9
- data/spec/opal/boolean/to_json_spec.rb +0 -11
- data/spec/opal/browser/local_storage_spec.rb +0 -55
- data/spec/opal/class/constants_spec.rb +0 -7
- data/spec/opal/class/extend_spec.rb +0 -47
- data/spec/opal/class/instance_methods_spec.rb +0 -13
- data/spec/opal/class/last_value_spec.rb +0 -67
- data/spec/opal/class/proc_methods_spec.rb +0 -23
- data/spec/opal/class/singleton_methods_spec.rb +0 -41
- data/spec/opal/hash/allocate_spec.rb +0 -16
- data/spec/opal/hash/new_spec.rb +0 -10
- data/spec/opal/hash/to_s_spec.rb +0 -9
- data/spec/opal/kernel/to_json_spec.rb +0 -7
- data/spec/opal/module/alias_method_spec.rb +0 -10
- data/spec/opal/module/attr_accessor_spec.rb +0 -8
- data/spec/opal/native/new_spec.rb +0 -19
- data/spec/opal/native/nil_spec.rb +0 -14
- data/spec/opal/nil/to_json_spec.rb +0 -7
- data/spec/opal/numeric/equal_spec.rb +0 -9
- data/spec/opal/runtime2/call_spec.rb +0 -16
- data/spec/opal/runtime2/class_hierarchy_spec.rb +0 -21
- data/spec/opal/runtime2/defined_spec.rb +0 -11
- data/spec/opal/runtime2/super_spec.rb +0 -16
- data/spec/opal/string/to_json_spec.rb +0 -8
- data/spec/parser/iter_spec.rb +0 -59
- data/spec/parser/lambda_spec.rb +0 -64
- data/spec/parser/parser_spec.rb +0 -41
- data/spec/parser/strscan/check_spec.rb +0 -13
- data/spec/parser/strscan/get_byte_spec.rb +0 -29
- data/spec/parser/strscan/scan_spec.rb +0 -33
- data/spec/parser/strscan/skip_spec.rb +0 -40
- data/spec/parser/super_spec.rb +0 -20
- data/spec/rubyspec/core/array/allocate_spec.rb +0 -19
- data/spec/rubyspec/core/array/append_spec.rb +0 -43
- data/spec/rubyspec/core/array/array_spec.rb +0 -7
- data/spec/rubyspec/core/array/assoc_spec.rb +0 -40
- data/spec/rubyspec/core/array/at_spec.rb +0 -56
- data/spec/rubyspec/core/array/choice_spec.rb +0 -20
- data/spec/rubyspec/core/array/clear_spec.rb +0 -61
- data/spec/rubyspec/core/array/clone_spec.rb +0 -15
- data/spec/rubyspec/core/array/collect_spec.rb +0 -53
- data/spec/rubyspec/core/array/combination_spec.rb +0 -55
- data/spec/rubyspec/core/array/compact_spec.rb +0 -111
- data/spec/rubyspec/core/array/comparison_spec.rb +0 -16
- data/spec/rubyspec/core/array/concat_spec.rb +0 -19
- data/spec/rubyspec/core/array/constructor_spec.rb +0 -24
- data/spec/rubyspec/core/array/count_spec.rb +0 -17
- data/spec/rubyspec/core/array/delete_at_spec.rb +0 -71
- data/spec/rubyspec/core/array/delete_if_spec.rb +0 -71
- data/spec/rubyspec/core/array/delete_spec.rb +0 -104
- data/spec/rubyspec/core/array/drop_spec.rb +0 -29
- data/spec/rubyspec/core/array/drop_while_spec.rb +0 -17
- data/spec/rubyspec/core/array/dup_spec.rb +0 -15
- data/spec/rubyspec/core/array/each_index_spec.rb +0 -40
- data/spec/rubyspec/core/array/each_spec.rb +0 -30
- data/spec/rubyspec/core/array/empty_spec.rb +0 -10
- data/spec/rubyspec/core/array/eql_spec.rb +0 -14
- data/spec/rubyspec/core/array/fetch_spec.rb +0 -52
- data/spec/rubyspec/core/array/find_index_spec.rb +0 -8
- data/spec/rubyspec/core/array/first_spec.rb +0 -89
- data/spec/rubyspec/core/array/fixtures/classes.rb +0 -538
- data/spec/rubyspec/core/array/flatten_spec.rb +0 -232
- data/spec/rubyspec/core/array/frozen_spec.rb +0 -32
- data/spec/rubyspec/core/array/include_spec.rb +0 -33
- data/spec/rubyspec/core/array/index_spec.rb +0 -6
- data/spec/rubyspec/core/array/insert_spec.rb +0 -90
- data/spec/rubyspec/core/array/inspect_spec.rb +0 -7
- data/spec/rubyspec/core/array/intersection_spec.rb +0 -78
- data/spec/rubyspec/core/array/join_spec.rb +0 -34
- data/spec/rubyspec/core/array/keep_if_spec.rb +0 -12
- data/spec/rubyspec/core/array/last_spec.rb +0 -88
- data/spec/rubyspec/core/array/length_spec.rb +0 -7
- data/spec/rubyspec/core/array/map_spec.rb +0 -11
- data/spec/rubyspec/core/array/max_spec.rb +0 -32
- data/spec/rubyspec/core/array/min_spec.rb +0 -32
- data/spec/rubyspec/core/array/minus_spec.rb +0 -89
- data/spec/rubyspec/core/array/multiply_spec.rb +0 -143
- data/spec/rubyspec/core/array/new_spec.rb +0 -137
- data/spec/rubyspec/core/array/ntimes_spec.rb +0 -26
- data/spec/rubyspec/core/array/plus_spec.rb +0 -64
- data/spec/rubyspec/core/array/pop_spec.rb +0 -196
- data/spec/rubyspec/core/array/push_spec.rb +0 -44
- data/spec/rubyspec/core/array/rassoc_spec.rb +0 -38
- data/spec/rubyspec/core/array/reject_spec.rb +0 -134
- data/spec/rubyspec/core/array/replace_spec.rb +0 -7
- data/spec/rubyspec/core/array/reverse_each_spec.rb +0 -37
- data/spec/rubyspec/core/array/reverse_spec.rb +0 -58
- data/spec/rubyspec/core/array/rindex_spec.rb +0 -71
- data/spec/rubyspec/core/array/select_spec.rb +0 -36
- data/spec/rubyspec/core/array/shared/collect.rb +0 -7
- data/spec/rubyspec/core/array/shared/enumeratorize.rb +0 -12
- data/spec/rubyspec/core/array/shared/eql.rb +0 -95
- data/spec/rubyspec/core/array/shared/index.rb +0 -37
- data/spec/rubyspec/core/array/shared/inspect.rb +0 -3
- data/spec/rubyspec/core/array/shared/join.rb +0 -7
- data/spec/rubyspec/core/array/shared/keep_if.rb +0 -3
- data/spec/rubyspec/core/array/shared/length.rb +0 -3
- data/spec/rubyspec/core/array/shared/replace.rb +0 -3
- data/spec/rubyspec/core/array/shared/slice.rb +0 -3
- data/spec/rubyspec/core/array/shift_spec.rb +0 -160
- data/spec/rubyspec/core/array/shuffle_spec.rb +0 -87
- data/spec/rubyspec/core/array/size_spec.rb +0 -7
- data/spec/rubyspec/core/array/slice_spec.rb +0 -166
- data/spec/rubyspec/core/array/sort_spec.rb +0 -271
- data/spec/rubyspec/core/array/take_spec.rb +0 -29
- data/spec/rubyspec/core/array/take_while_spec.rb +0 -17
- data/spec/rubyspec/core/array/to_a_spec.rb +0 -24
- data/spec/rubyspec/core/array/to_ary_spec.rb +0 -20
- data/spec/rubyspec/core/array/try_convert_spec.rb +0 -52
- data/spec/rubyspec/core/array/uniq_spec.rb +0 -167
- data/spec/rubyspec/core/array/unshift_spec.rb +0 -64
- data/spec/rubyspec/core/array/zip_spec.rb +0 -55
- data/spec/rubyspec/core/class/fixtures/classes.rb +0 -9
- data/spec/rubyspec/core/class/new_spec.rb +0 -113
- data/spec/rubyspec/core/enumerable/all_spec.rb +0 -130
- data/spec/rubyspec/core/enumerable/any_spec.rb +0 -150
- data/spec/rubyspec/core/enumerable/collect_spec.rb +0 -39
- data/spec/rubyspec/core/enumerable/count_spec.rb +0 -45
- data/spec/rubyspec/core/enumerable/detect_spec.rb +0 -48
- data/spec/rubyspec/core/enumerable/drop_spec.rb +0 -20
- data/spec/rubyspec/core/enumerable/drop_while_spec.rb +0 -18
- data/spec/rubyspec/core/enumerable/each_slice_spec.rb +0 -25
- data/spec/rubyspec/core/enumerable/each_with_index_spec.rb +0 -14
- data/spec/rubyspec/core/enumerable/each_with_object_spec.rb +0 -20
- data/spec/rubyspec/core/enumerable/entries_spec.rb +0 -9
- data/spec/rubyspec/core/enumerable/find_all_spec.rb +0 -16
- data/spec/rubyspec/core/enumerable/find_index_spec.rb +0 -44
- data/spec/rubyspec/core/enumerable/find_spec.rb +0 -56
- data/spec/rubyspec/core/enumerable/first_spec.rb +0 -43
- data/spec/rubyspec/core/enumerable/fixtures/classes.rb +0 -240
- data/spec/rubyspec/core/enumerable/grep_spec.rb +0 -24
- data/spec/rubyspec/core/enumerable/group_by_spec.rb +0 -16
- data/spec/rubyspec/core/enumerable/none_spec.rb +0 -68
- data/spec/rubyspec/core/enumerable/select_spec.rb +0 -16
- data/spec/rubyspec/core/enumerable/sort_by_spec.rb +0 -31
- data/spec/rubyspec/core/enumerable/take_spec.rb +0 -43
- data/spec/rubyspec/core/enumerable/to_a_spec.rb +0 -9
- data/spec/rubyspec/core/enumerator/each_spec.rb +0 -11
- data/spec/rubyspec/core/enumerator/new_spec.rb +0 -17
- data/spec/rubyspec/core/enumerator/next_spec.rb +0 -25
- data/spec/rubyspec/core/enumerator/rewind_spec.rb +0 -28
- data/spec/rubyspec/core/false/and_spec.rb +0 -11
- data/spec/rubyspec/core/false/inspect_spec.rb +0 -7
- data/spec/rubyspec/core/false/or_spec.rb +0 -11
- data/spec/rubyspec/core/false/to_s_spec.rb +0 -7
- data/spec/rubyspec/core/false/xor_spec.rb +0 -11
- data/spec/rubyspec/core/hash/allocate_spec.rb +0 -13
- data/spec/rubyspec/core/hash/assoc_spec.rb +0 -25
- data/spec/rubyspec/core/hash/clear_spec.rb +0 -19
- data/spec/rubyspec/core/hash/clone_spec.rb +0 -10
- data/spec/rubyspec/core/hash/constructor_spec.rb +0 -13
- data/spec/rubyspec/core/hash/default_proc_spec.rb +0 -20
- data/spec/rubyspec/core/hash/default_spec.rb +0 -17
- data/spec/rubyspec/core/hash/delete_if_spec.rb +0 -13
- data/spec/rubyspec/core/hash/delete_spec.rb +0 -11
- data/spec/rubyspec/core/hash/dup_spec.rb +0 -10
- data/spec/rubyspec/core/hash/each_key_spec.rb +0 -15
- data/spec/rubyspec/core/hash/each_pair_spec.rb +0 -30
- data/spec/rubyspec/core/hash/each_spec.rb +0 -36
- data/spec/rubyspec/core/hash/each_value_spec.rb +0 -15
- data/spec/rubyspec/core/hash/element_reference_spec.rb +0 -41
- data/spec/rubyspec/core/hash/element_set_spec.rb +0 -7
- data/spec/rubyspec/core/hash/empty_spec.rb +0 -10
- data/spec/rubyspec/core/hash/fetch_spec.rb +0 -24
- data/spec/rubyspec/core/hash/flatten_spec.rb +0 -46
- data/spec/rubyspec/core/hash/has_key_spec.rb +0 -24
- data/spec/rubyspec/core/hash/has_value_spec.rb +0 -12
- data/spec/rubyspec/core/hash/include_spec.rb +0 -24
- data/spec/rubyspec/core/hash/index_spec.rb +0 -13
- data/spec/rubyspec/core/hash/indexes_spec.rb +0 -9
- data/spec/rubyspec/core/hash/indices_spec.rb +0 -9
- data/spec/rubyspec/core/hash/invert_spec.rb +0 -12
- data/spec/rubyspec/core/hash/keep_if_spec.rb +0 -18
- data/spec/rubyspec/core/hash/key_spec.rb +0 -24
- data/spec/rubyspec/core/hash/keys_spec.rb +0 -10
- data/spec/rubyspec/core/hash/length_spec.rb +0 -10
- data/spec/rubyspec/core/hash/member_spec.rb +0 -24
- data/spec/rubyspec/core/hash/merge_spec.rb +0 -37
- data/spec/rubyspec/core/hash/new_spec.rb +0 -19
- data/spec/rubyspec/core/hash/rassoc_spec.rb +0 -34
- data/spec/rubyspec/core/hash/reject_spec.rb +0 -18
- data/spec/rubyspec/core/hash/replace_spec.rb +0 -7
- data/spec/rubyspec/core/hash/select_spec.rb +0 -52
- data/spec/rubyspec/core/hash/shift_spec.rb +0 -19
- data/spec/rubyspec/core/hash/size_spec.rb +0 -10
- data/spec/rubyspec/core/hash/to_a_spec.rb +0 -13
- data/spec/rubyspec/core/hash/to_json_spec.rb +0 -11
- data/spec/rubyspec/core/hash/update_spec.rb +0 -17
- data/spec/rubyspec/core/hash/value_spec.rb +0 -12
- data/spec/rubyspec/core/hash/values_at_spec.rb +0 -9
- data/spec/rubyspec/core/hash/values_spec.rb +0 -7
- data/spec/rubyspec/core/kernel/eql_spec.rb +0 -15
- data/spec/rubyspec/core/kernel/equal_spec.rb +0 -12
- data/spec/rubyspec/core/kernel/tap_spec.rb +0 -10
- data/spec/rubyspec/core/kernel/to_s_spec.rb +0 -5
- data/spec/rubyspec/core/matchdata/to_a_spec.rb +0 -5
- data/spec/rubyspec/core/nil/and_spec.rb +0 -11
- data/spec/rubyspec/core/nil/dup_spec.rb +0 -7
- data/spec/rubyspec/core/nil/inspect_spec.rb +0 -7
- data/spec/rubyspec/core/nil/nil_spec.rb +0 -7
- data/spec/rubyspec/core/nil/or_spec.rb +0 -11
- data/spec/rubyspec/core/nil/to_a_spec.rb +0 -7
- data/spec/rubyspec/core/nil/to_f_spec.rb +0 -11
- data/spec/rubyspec/core/nil/to_h_spec.rb +0 -10
- data/spec/rubyspec/core/nil/to_i_spec.rb +0 -11
- data/spec/rubyspec/core/nil/to_s_spec.rb +0 -7
- data/spec/rubyspec/core/nil/xor_spec.rb +0 -11
- data/spec/rubyspec/core/numeric/to_s_spec.rb +0 -8
- data/spec/rubyspec/core/range/begin_spec.rb +0 -9
- data/spec/rubyspec/core/range/case_compare_spec.rb +0 -15
- data/spec/rubyspec/core/range/end_spec.rb +0 -9
- data/spec/rubyspec/core/regexp/match_spec.rb +0 -95
- data/spec/rubyspec/core/string/capitalize_spec.rb +0 -10
- data/spec/rubyspec/core/string/casecmp_spec.rb +0 -16
- data/spec/rubyspec/core/string/center_spec.rb +0 -49
- data/spec/rubyspec/core/string/chomp_spec.rb +0 -48
- data/spec/rubyspec/core/string/downcase_spec.rb +0 -6
- data/spec/rubyspec/core/string/empty_spec.rb +0 -7
- data/spec/rubyspec/core/string/end_with_spec.rb +0 -16
- data/spec/rubyspec/core/string/include_spec.rb +0 -6
- data/spec/rubyspec/core/string/index_spec.rb +0 -405
- data/spec/rubyspec/core/string/intern_spec.rb +0 -9
- data/spec/rubyspec/core/string/length_spec.rb +0 -9
- data/spec/rubyspec/core/string/reverse_spec.rb +0 -7
- data/spec/rubyspec/core/string/size_spec.rb +0 -9
- data/spec/rubyspec/core/string/start_with_spec.rb +0 -12
- data/spec/rubyspec/core/string/swapcase_spec.rb +0 -13
- data/spec/rubyspec/core/string/to_a_spec.rb +0 -9
- data/spec/rubyspec/core/string/to_s_spec.rb +0 -6
- data/spec/rubyspec/core/string/to_str_spec.rb +0 -6
- data/spec/rubyspec/core/string/to_sym_spec.rb +0 -9
- data/spec/rubyspec/core/string/upcase_spec.rb +0 -6
- data/spec/rubyspec/core/struct/fixtures/classes.rb +0 -26
- data/spec/rubyspec/core/struct/initialize_spec.rb +0 -11
- data/spec/rubyspec/core/struct/new_spec.rb +0 -24
- data/spec/rubyspec/core/symbol/to_proc_spec.rb +0 -12
- data/spec/rubyspec/core/time/at_spec.rb +0 -7
- data/spec/rubyspec/core/time/day_spec.rb +0 -5
- data/spec/rubyspec/core/time/friday_spec.rb +0 -9
- data/spec/rubyspec/core/time/hour_spec.rb +0 -5
- data/spec/rubyspec/core/time/min_spec.rb +0 -5
- data/spec/rubyspec/core/time/monday_spec.rb +0 -9
- data/spec/rubyspec/core/time/month_spec.rb +0 -5
- data/spec/rubyspec/core/time/now_spec.rb +0 -5
- data/spec/rubyspec/core/time/saturday_spec.rb +0 -9
- data/spec/rubyspec/core/true/and_spec.rb +0 -11
- data/spec/rubyspec/core/true/inspect_spec.rb +0 -7
- data/spec/rubyspec/core/true/or_spec.rb +0 -11
- data/spec/rubyspec/core/true/to_s_spec.rb +0 -7
- data/spec/rubyspec/core/true/xor_spec.rb +0 -11
- data/spec/rubyspec/language/alias_spec.rb +0 -160
- data/spec/rubyspec/language/and_spec.rb +0 -66
- data/spec/rubyspec/language/array_spec.rb +0 -117
- data/spec/rubyspec/language/break_spec.rb +0 -332
- data/spec/rubyspec/language/case_spec.rb +0 -310
- data/spec/rubyspec/language/class_spec.rb +0 -190
- data/spec/rubyspec/language/class_variable_spec.rb +0 -56
- data/spec/rubyspec/language/def_spec.rb +0 -551
- data/spec/rubyspec/language/defined_spec.rb +0 -107
- data/spec/rubyspec/language/ensure_spec.rb +0 -104
- data/spec/rubyspec/language/execution_spec.rb +0 -15
- data/spec/rubyspec/language/for_spec.rb +0 -192
- data/spec/rubyspec/language/hash_spec.rb +0 -65
- data/spec/rubyspec/language/if_spec.rb +0 -356
- data/spec/rubyspec/language/literal_lambda_spec.rb +0 -1
- data/spec/rubyspec/language/loop_spec.rb +0 -67
- data/spec/rubyspec/language/metaclass_spec.rb +0 -159
- data/spec/rubyspec/language/module_spec.rb +0 -56
- data/spec/rubyspec/language/next_spec.rb +0 -469
- data/spec/rubyspec/language/not_spec.rb +0 -55
- data/spec/rubyspec/language/or_spec.rb +0 -90
- data/spec/rubyspec/language/order_spec.rb +0 -77
- data/spec/rubyspec/language/precedence_spec.rb +0 -483
- data/spec/rubyspec/language/redo_spec.rb +0 -65
- data/spec/rubyspec/language/rescue_spec.rb +0 -121
- data/spec/rubyspec/language/retry_spec.rb +0 -56
- data/spec/rubyspec/language/return_spec.rb +0 -281
- data/spec/rubyspec/language/singleton_class_spec.rb +0 -32
- data/spec/rubyspec/language/super_spec.rb +0 -284
- data/spec/rubyspec/language/undef_spec.rb +0 -16
- data/spec/rubyspec/language/unless_spec.rb +0 -45
- data/spec/rubyspec/language/until_spec.rb +0 -234
- data/spec/rubyspec/language/while_spec.rb +0 -238
- data/spec/rubyspec/language/yield_spec.rb +0 -128
- data/spec/rubyspec/library/date/new_spec.rb +0 -10
- data/spec/rubyspec/library/date/to_s_spec.rb +0 -7
- data/spec/rubyspec/library/date/today_spec.rb +0 -7
- data/spec/rubyspec/library/erb/util/html_escape_spec.rb +0 -10
- data/spec/rubyspec/library/observer/add_observer_spec.rb +0 -31
- data/spec/rubyspec/library/observer/count_observers_spec.rb +0 -33
- data/spec/rubyspec/library/observer/delete_observer_spec.rb +0 -19
- data/spec/rubyspec/library/observer/delete_observers_spec.rb +0 -19
- data/spec/rubyspec/library/observer/fixtures/classes.rb +0 -25
- data/spec/rubyspec/library/observer/notify_observers_spec.rb +0 -31
- data/spec/rubyspec/library/rbconfig/config_spec.rb +0 -47
- data/spec/rubyspec/library/singleton/clone_spec.rb +0 -8
- data/spec/rubyspec/library/singleton/dup_spec.rb +0 -8
- data/spec/rubyspec/library/singleton/fixtures/classes.rb +0 -18
- data/spec/rubyspec/library/singleton/instance_spec.rb +0 -30
- data/spec/rubyspec/library/stringscanner/element_reference_spec.rb +0 -29
- data/spec/rubyspec/library/stringscanner/pos_spec.rb +0 -20
- data/spec/rubyspec/spec_helper.rb +0 -96
- data/stdlib/fileutils.rb +0 -0
- data/stdlib/iconv.rb +0 -0
- data/stdlib/opal-browser/local_storage.rb +0 -27
- data/stdlib/opal-browser/script_loader.rb +0 -35
- data/stdlib/opal-parser.js.erb +0 -13
- data/stdlib/yaml.rb +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
opal_filter "Module" do
|
|
2
|
+
fails "A class definition has no class variables"
|
|
3
|
+
fails "A class definition allows the declaration of class variables in the body"
|
|
4
|
+
fails "A class definition allows the declaration of class variables in a class method"
|
|
5
|
+
fails "A class definition allows the declaration of class variables in an instance method"
|
|
6
|
+
|
|
7
|
+
fails "Module#method_defined? converts the given name to a string using to_str"
|
|
8
|
+
fails "Module#method_defined? raises a TypeError when the given object is not a string/symbol/fixnum"
|
|
9
|
+
fails "Module#method_defined? does not search Object or Kernel when called on a module"
|
|
10
|
+
fails "Module#method_defined? returns true if a public or private method with the given name is defined in self, self's ancestors or one of self's included modules"
|
|
11
|
+
|
|
12
|
+
fails "Module#const_defined? should not search parent scopes of classes and modules if inherit is false"
|
|
13
|
+
fails "Module#const_get should not search parent scopes of classes and modules if inherit is false"
|
|
14
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
opal_filter "RegExp" do
|
|
2
|
+
fails "Regexp#~ matches against the contents of $_"
|
|
3
|
+
fails "Regexp#match when passed a block returns the block result"
|
|
4
|
+
fails "Regexp#match when passed a block yields the MatchData"
|
|
5
|
+
fails "Regexp#match uses the start as a character offset"
|
|
6
|
+
fails "Regexp#match matches the input at a given position"
|
|
7
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
opal_filter "Set" do
|
|
2
|
+
fails "Set#== returns true when the passed Object is a Set and self and the Object contain the same elements"
|
|
3
|
+
fails "Set#== does not depend on the order of nested Sets"
|
|
4
|
+
fails "Set#merge raises an ArgumentError when passed a non-Enumerable"
|
|
5
|
+
|
|
6
|
+
fails "Emumerable#to_set allows passing an alternate class for Set"
|
|
7
|
+
end
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
opal_filter "Singleton
|
|
1
|
+
opal_filter "Singleton" do
|
|
2
|
+
fails "Singleton#_dump returns an empty string"
|
|
3
|
+
fails "Singleton#_dump returns an empty string from a singleton subclass"
|
|
2
4
|
fails "Singleton.instance returns an instance of the singleton's clone"
|
|
3
5
|
fails "Singleton.instance returns the same instance for multiple class to instance on clones"
|
|
4
6
|
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
opal_filter "String" do
|
|
2
|
+
fails "String#center with length, padding pads with whitespace if no padstr is given"
|
|
3
|
+
fails "String#center with length, padding returns a new string of specified length with self centered and padded with padstr"
|
|
4
|
+
|
|
5
|
+
fails "String#lines should split on the default record separator and return enumerator if not block is given"
|
|
6
|
+
|
|
7
|
+
fails "String#upcase is locale insensitive (only replaces a-z)"
|
|
8
|
+
fails "String#size returns the length of self"
|
|
9
|
+
fails "String#length returns the length of self"
|
|
10
|
+
|
|
11
|
+
fails "String#index with Regexp converts start_offset to an integer via to_int"
|
|
12
|
+
fails "String#index with Regexp supports \\G which matches at the given start offset"
|
|
13
|
+
fails "String#index with Regexp starts the search at the given offset"
|
|
14
|
+
fails "String#index with Regexp returns the index of the first match of regexp"
|
|
15
|
+
fails "String#index calls #to_int to convert the second argument"
|
|
16
|
+
fails "String#index calls #to_str to convert the first argument"
|
|
17
|
+
fails "String#index raises a TypeError if passed a Symbol"
|
|
18
|
+
|
|
19
|
+
fails "String#intern special cases +(binary) and -(binary)"
|
|
20
|
+
fails "String#to_sym special cases +(binary) and -(binary)"
|
|
21
|
+
|
|
22
|
+
fails "String#start_with? ignores arguments not convertible to string"
|
|
23
|
+
fails "String#start_with? converts its argument using :to_str"
|
|
24
|
+
fails "String#end_with? converts its argument using :to_str"
|
|
25
|
+
fails "String#end_with? returns true if other is empty"
|
|
26
|
+
fails "String#downcase is locale insensitive (only replaces A-Z)"
|
|
27
|
+
fails "String#intern does not special case certain operators"
|
|
28
|
+
fails "String#to_sym does not special case certain operators"
|
|
29
|
+
fails "String#capitalize is locale insensitive (only upcases a-z and only downcases A-Z)"
|
|
30
|
+
fails "String#center with length, padding raises an ArgumentError if padstr is empty"
|
|
31
|
+
fails "String#center with length, padding raises a TypeError when padstr can't be converted to a string"
|
|
32
|
+
fails "String#center with length, padding calls #to_str to convert padstr to a String"
|
|
33
|
+
fails "String#center with length, padding raises a TypeError when length can't be converted to an integer"
|
|
34
|
+
fails "String#center with length, padding calls #to_int to convert length to an integer"
|
|
35
|
+
fails "String#chomp when passed an Object raises a TypeError if #to_str does not return a String"
|
|
36
|
+
fails "String#chomp when passed no argument returns a copy of the String when it is not modified"
|
|
37
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
opal_filter "StringScanner" do
|
|
2
|
+
fails "StringScanner#[] calls to_int on the given index"
|
|
3
|
+
fails "StringScanner#[] raises a TypeError if the given index is nil"
|
|
4
|
+
fails "StringScanner#[] raises a TypeError when a Range is as argument"
|
|
5
|
+
|
|
6
|
+
fails "StringScanner#get_byte is not multi-byte character sensitive"
|
|
7
|
+
|
|
8
|
+
fails "StringScanner#pos returns the position of the scan pointer"
|
|
9
|
+
fails "StringScanner#pos returns the position of the scan pointer for multibyte string"
|
|
10
|
+
fails "StringScanner#pos returns 0 in the reset position"
|
|
11
|
+
fails "StringScanner#pos returns the length of the string in the terminate position"
|
|
12
|
+
fails "StringScanner#pos returns the `bytesize` for multibyte string in the terminate position"
|
|
13
|
+
fails "StringScanner#pos= raises a RangeError if position too far backward"
|
|
14
|
+
fails "StringScanner#pos= raises a RangeError when the passed argument is out of range"
|
|
15
|
+
|
|
16
|
+
fails "StringScanner#scan returns the matched string for a multi byte string"
|
|
17
|
+
fails "StringScanner#scan raises a TypeError if pattern isn't a Regexp"
|
|
18
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
opal_filter "Struct" do
|
|
2
|
+
fails "Struct#initialize can be overriden"
|
|
3
|
+
fails "Struct.new fails with too many arguments"
|
|
4
|
+
fails "Struct.new creates a constant in subclass' namespace"
|
|
5
|
+
fails "Struct.new raises a TypeError if object is not a Symbol"
|
|
6
|
+
fails "Struct.new raises a TypeError if object doesn't respond to to_sym"
|
|
7
|
+
fails "Struct.new fails with invalid constant name as first argument"
|
|
8
|
+
fails "Struct.new does not create a constant with symbol as first argument"
|
|
9
|
+
fails "Struct.new creates a new anonymous class with nil first argument"
|
|
10
|
+
fails "Struct.new calls to_str on its first argument (constant name)"
|
|
11
|
+
end
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
opal_filter "Symbol" do
|
|
2
|
+
fails "Symbol#to_proc sends self to arguments passed when calling #call on the Proc"
|
|
3
|
+
fails "Symbol#to_proc raises an ArgumentError when calling #call on the Proc without receiver"
|
|
4
|
+
fails "Symbol#to_proc passes along the block passed to Proc#call"
|
|
5
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
opal_filter "Time" do
|
|
2
|
+
fails "Time.mktime respects rare old timezones"
|
|
3
|
+
fails "Time.mktime creates a time based on given values, interpreted in the local time zone"
|
|
4
|
+
fails "Time.mktime creates the correct time just before dst change"
|
|
5
|
+
fails "Time.mktime creates the correct time just after dst change"
|
|
6
|
+
fails "Time.mktime handles fractional seconds as a Rational"
|
|
7
|
+
fails "Time.mktime handles fractional seconds as a Float"
|
|
8
|
+
fails "Time.mktime creates a time based on given C-style gmtime arguments, interpreted in the local time zone"
|
|
9
|
+
fails "Time.mktime coerces the month with #to_str"
|
|
10
|
+
fails "Time.mktime handles a String day"
|
|
11
|
+
fails "Time.mktime interprets all numerals as base 10"
|
|
12
|
+
fails "Time.mktime handles a String month given as a short month name"
|
|
13
|
+
fails "Time.mktime returns subclass instances"
|
|
14
|
+
|
|
15
|
+
fails "Time#day returns the day of the month for a Time with a fixed offset"
|
|
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"
|
|
20
|
+
|
|
21
|
+
fails "Time#month returns the four digit year for a Time with a fixed offset"
|
|
22
|
+
fails "Time#month returns the month of the year for a local Time"
|
|
23
|
+
|
|
24
|
+
fails "Time#min returns the minute of the hour for a Time with a fixed offset"
|
|
25
|
+
fails "Time#min returns the minute of the hour (0..59) for a local Time"
|
|
26
|
+
|
|
27
|
+
fails "Time#strftime supports week of year format with %U and %W"
|
|
28
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
opal_filter "Kernel#Integer() fix broke mspec" do
|
|
2
|
+
fails "Array#shuffle calls #to_f on the Object returned by #rand"
|
|
3
|
+
fails "Array#shuffle raises a RangeError if the random generator returns a value less than 0.0"
|
|
4
|
+
fails "Array#shuffle raises a RangeError if the random generator returns a value equal to 1.0"
|
|
5
|
+
fails "Array#shuffle raises a RangeError if the random generator returns a value greater than 1.0"
|
|
6
|
+
fails "A singleton class has class Bignum as the superclass of a Bignum instance"
|
|
7
|
+
fails "Hash.[] ignores elements that are arrays of more than 2 elements"
|
|
8
|
+
fails "Hash.[] creates a Hash; values can be provided as a list of value-invalid-pairs in an array"
|
|
9
|
+
fails "Hash#default_proc= raises an error if passed nil"
|
|
10
|
+
fails "ERB::Util.html_escape not escape characters except '& < > \"'"
|
|
11
|
+
end
|
|
@@ -2,4 +2,36 @@ opal_filter "Array subclasses" do
|
|
|
2
2
|
fails "Array.[] returns a new array populated with the given elements"
|
|
3
3
|
fails "Array[] is a synonym for .[]"
|
|
4
4
|
fails "Array.new returns an instance of a subclass"
|
|
5
|
+
fails "Array#values_at does not return subclass instance on Array subclasses"
|
|
6
|
+
fails "Array#to_a does not return subclass instance on Array subclasses"
|
|
7
|
+
fails "Array#uniq returns subclass instance on Array subclasses"
|
|
8
|
+
fails "Array#clone returns an Array or a subclass instance"
|
|
9
|
+
fails "Array#<=> does not call #to_ary on Array subclasses"
|
|
10
|
+
fails "Array#concat does not call #to_ary on Array subclasses"
|
|
11
|
+
fails "Array#dup returns an Array or a subclass instance"
|
|
12
|
+
fails "Array#[]= does not call to_ary on rhs array subclasses for multi-element sets"
|
|
13
|
+
fails "Array#eql? does not call #to_ary on Array subclasses"
|
|
14
|
+
fails "Array#== does not call #to_ary on Array subclasses"
|
|
15
|
+
fails "Array#flatten returns subclass instance for Array subclasses"
|
|
16
|
+
fails "Array#initialize with (array) does not call #to_ary on instances of Array or subclasses of Array"
|
|
17
|
+
fails "Array#initialize is called on subclasses"
|
|
18
|
+
fails "Array#* with an integer with a subclass of Array returns a subclass instance"
|
|
19
|
+
fails "Array.new with (array) does not call #to_ary on instances of Array or subclasses of Array"
|
|
20
|
+
fails "Array#replace does not call #to_ary on Array subclasses"
|
|
21
|
+
fails "Array#slice with a subclass of Array returns a subclass instance with [-n...-m]"
|
|
22
|
+
fails "Array#slice with a subclass of Array returns a subclass instance with [-n..-m]"
|
|
23
|
+
fails "Array#slice with a subclass of Array returns a subclass instance with [n...m]"
|
|
24
|
+
fails "Array#slice with a subclass of Array returns a subclass instance with [n..m]"
|
|
25
|
+
fails "Array#slice with a subclass of Array returns a subclass instance with [-n, m]"
|
|
26
|
+
fails "Array#slice with a subclass of Array returns a subclass instance with [n, m]"
|
|
27
|
+
|
|
28
|
+
fails "Array#[] with a subclass of Array returns a subclass instance with [n, m]"
|
|
29
|
+
fails "Array#[] with a subclass of Array returns a subclass instance with [-n, m]"
|
|
30
|
+
fails "Array#[] with a subclass of Array returns a subclass instance with [n..m]"
|
|
31
|
+
fails "Array#[] with a subclass of Array returns a subclass instance with [n...m]"
|
|
32
|
+
fails "Array#[] with a subclass of Array returns a subclass instance with [-n..-m]"
|
|
33
|
+
fails "Array#[] with a subclass of Array returns a subclass instance with [-n...-m]"
|
|
34
|
+
fails "Array.[] with a subclass of Array returns an instance of the subclass"
|
|
35
|
+
fails "Array#initialize_copy does not call #to_ary on Array subclasses"
|
|
36
|
+
fails "Array#partition does not return subclass instances on Array subclasses"
|
|
5
37
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
opal_filter "Encoding" do
|
|
2
|
+
fails "Array#inspect raises if inspected result is not default external encoding"
|
|
3
|
+
fails "Array#inspect use US-ASCII encoding if the default external encoding is not ascii compatible"
|
|
4
|
+
fails "Array#inspect use the default external encoding if it is ascii compatible"
|
|
5
|
+
fails "Array#inspect returns a US-ASCII string for an empty Array"
|
|
6
|
+
fails "Array#to_s raises if inspected result is not default external encoding"
|
|
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"
|
|
10
|
+
fails "Array#join fails for arrays with incompatibly-encoded strings"
|
|
11
|
+
fails "Array#join uses the widest common encoding when other strings are incompatible"
|
|
12
|
+
fails "Array#join uses the first encoding when other strings are compatible"
|
|
13
|
+
fails "Array#join returns a US-ASCII string for an empty Array"
|
|
14
|
+
end
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
opal_filter "Object#frozen" do
|
|
2
|
+
fails "Array#fill raises a RuntimeError on a frozen array"
|
|
3
|
+
fails "Array#fill raises a RuntimeError on an empty frozen array"
|
|
2
4
|
fails "Array#frozen? returns true if array is frozen"
|
|
3
5
|
fails "Array#frozen? returns false for an array being sorted by #sort"
|
|
4
6
|
fails "Array#unshift raises a RuntimeError on a frozen array when the array is modified"
|
|
@@ -29,4 +31,59 @@ opal_filter "Object#frozen" do
|
|
|
29
31
|
fails "Array#compact! raises a RuntimeError on a frozen array"
|
|
30
32
|
fails "Array#clear raises a RuntimeError on a frozen array"
|
|
31
33
|
fails "Array#<< raises a RuntimeError on a frozen array"
|
|
34
|
+
fails "Array#[]= raises a RuntimeError on a frozen array"
|
|
35
|
+
fails "Array#map! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty"
|
|
36
|
+
fails "Array#map! when frozen raises a RuntimeError when calling #each on the returned Enumerator"
|
|
37
|
+
fails "Array#map! when frozen raises a RuntimeError when empty"
|
|
38
|
+
fails "Array#map! when frozen raises a RuntimeError"
|
|
39
|
+
fails "Array#reject! returns an Enumerator if no block given, and the array is frozen"
|
|
40
|
+
fails "Array#replace raises a RuntimeError on a frozen array"
|
|
41
|
+
fails "Array#select! on frozen objects with truthy block keeps elements after any exception"
|
|
42
|
+
fails "Array#select! on frozen objects with truthy block raises a RuntimeError"
|
|
43
|
+
fails "Array#select! on frozen objects with falsy block keeps elements after any exception"
|
|
44
|
+
fails "Array#select! on frozen objects with falsy block raises a RuntimeError"
|
|
45
|
+
fails "Array#clone copies frozen status from the original"
|
|
46
|
+
fails "Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty"
|
|
47
|
+
fails "Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator"
|
|
48
|
+
fails "Array#collect! when frozen raises a RuntimeError when empty"
|
|
49
|
+
fails "Array#collect! when frozen raises a RuntimeError"
|
|
50
|
+
fails "Array#concat raises a RuntimeError when Array is frozen and modification occurs"
|
|
51
|
+
fails "Array#concat raises a RuntimeError when Array is frozen and no modification occurs"
|
|
52
|
+
fails "Array#delete_if returns an Enumerator if no block given, and the array is frozen"
|
|
53
|
+
fails "Array#[]= checks frozen before attempting to coerce arguments"
|
|
54
|
+
fails "Array#keep_if on frozen objects returns an Enumerator if no block is given"
|
|
55
|
+
fails "Array#keep_if on frozen objects with truthy block keeps elements after any exception"
|
|
56
|
+
fails "Array#keep_if on frozen objects with truthy block raises a RuntimeError"
|
|
57
|
+
fails "Array#keep_if on frozen objects with falsy block keeps elements after any exception"
|
|
58
|
+
fails "Array#keep_if on frozen objects with falsy block raises a RuntimeError"
|
|
59
|
+
fails "Array#initialize raises a RuntimeError on frozen arrays"
|
|
60
|
+
fails "Array#initialize_copy raises a RuntimeError on a frozen array"
|
|
61
|
+
|
|
62
|
+
fails "Hash#clear raises a RuntimeError if called on a frozen instance"
|
|
63
|
+
fails "Hash#initialize_copy raises a RuntimeError if called on a frozen instance that would not be modified"
|
|
64
|
+
fails "Hash#initialize_copy raises a RuntimeError if called on a frozen instance that is modified"
|
|
65
|
+
fails "Hash#initialize raises a RuntimeError if called on a frozen instance"
|
|
66
|
+
fails "Hash#store raises a RuntimeError if called on a frozen instance"
|
|
67
|
+
fails "Hash#store duplicates and freezes string keys"
|
|
68
|
+
fails "Hash#default= raises a RuntimeError if called on a frozen instance"
|
|
69
|
+
fails "Hash#delete_if raises an RuntimeError if called on a frozen instance"
|
|
70
|
+
fails "Hash#delete raises a RuntimeError if called on a frozen instance"
|
|
71
|
+
fails "Hash#[]= raises a RuntimeError if called on a frozen instance"
|
|
72
|
+
fails "Hash#keep_if raises an RuntimeError if called on a frozen instance"
|
|
73
|
+
fails "Hash#merge! raises a RuntimeError on a frozen instance that is modified"
|
|
74
|
+
fails "Hash#merge! checks frozen status before coercing an object with #to_hash"
|
|
75
|
+
fails "Hash#merge! raises a RuntimeError on a frozen instance that would not be modified"
|
|
76
|
+
fails "Hash#reject! raises a RuntimeError if called on a frozen instance that is modified"
|
|
77
|
+
fails "Hash#reject! raises a RuntimeError if called on a frozen instance that would not be modified"
|
|
78
|
+
fails "Hash#reject! returns an Enumerator if called on a frozen instance"
|
|
79
|
+
fails "Hash#replace raises a RuntimeError if called on a frozen instance that is modified"
|
|
80
|
+
fails "Hash#replace raises a RuntimeError if called on a frozen instance that would not be modified"
|
|
81
|
+
fails "Hash#select! raises a RuntimeError if called on an empty frozen instance"
|
|
82
|
+
fails "Hash#select! raises a RuntimeError if called on a frozen instance that would not be modified"
|
|
83
|
+
fails "Hash#shift raises a RuntimeError if called on a frozen instance"
|
|
84
|
+
fails "Hash#update raises a RuntimeError on a frozen instance that would not be modified"
|
|
85
|
+
fails "Hash#update checks frozen status before coercing an object with #to_hash"
|
|
86
|
+
fails "Hash#update raises a RuntimeError on a frozen instance that is modified"
|
|
87
|
+
fails "Hash#rehash raises a RuntimeError if called on a frozen instance"
|
|
88
|
+
fails "Hash#[]= duplicates and freezes string keys"
|
|
32
89
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
opal_filter "Hash#comapre_by_identity" do
|
|
2
|
+
fails "Hash#compare_by_identity causes future comparisons on the receiver to be made by identity"
|
|
3
|
+
fails "Hash#compare_by_identity causes #compare_by_identity? to return true"
|
|
4
|
+
fails "Hash#compare_by_identity returns self"
|
|
5
|
+
fails "Hash#compare_by_identity uses the semantics of BasicObject#equal? to determine key identity"
|
|
6
|
+
fails "Hash#compare_by_identity uses #equal? semantics, but doesn't actually call #equal? to determine identity"
|
|
7
|
+
fails "Hash#compare_by_identity regards #dup'd objects as having different identities"
|
|
8
|
+
fails "Hash#compare_by_identity regards #clone'd objects as having different identities"
|
|
9
|
+
fails "Hash#compare_by_identity regards references to the same object as having the same identity"
|
|
10
|
+
fails "Hash#compare_by_identity raises a RuntimeError on frozen hashes"
|
|
11
|
+
fails "Hash#compare_by_identity perists over #dups"
|
|
12
|
+
fails "Hash#compare_by_identity persists over #clones"
|
|
13
|
+
fails "Hash#compare_by_identity? returns false by default"
|
|
14
|
+
fails "Hash#compare_by_identity? returns true once #compare_by_identity has been invoked on self"
|
|
15
|
+
fails "Hash#compare_by_identity? returns true when called multiple times on the same ident hash"
|
|
16
|
+
end
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
opal_filter "immutable strings" do
|
|
2
|
+
fails "Array#fill does not replicate the filler"
|
|
3
|
+
|
|
2
4
|
fails "Hash literal freezes string keys on initialization"
|
|
5
|
+
|
|
6
|
+
fails "Time#strftime formats time according to the directives in the given format string"
|
|
7
|
+
fails "Time#strftime with %z formats a local time with positive UTC offset as '+HHMM'"
|
|
8
|
+
fails "Time#strftime with %z formats a local time with negative UTC offset as '-HHMM'"
|
|
3
9
|
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
opal_filter "Mutable Strings" do
|
|
2
|
+
fails "String#upcase! raises a RuntimeError when self is frozen"
|
|
3
|
+
fails "String#upcase! returns nil if no modifications were made"
|
|
4
|
+
fails "String#upcase! modifies self in place"
|
|
5
|
+
fails "String#swapcase! modifies self in place"
|
|
6
|
+
fails "String#swapcase! returns nil if no modifications were made"
|
|
7
|
+
fails "String#swapcase! raises a RuntimeError when self is frozen"
|
|
8
|
+
fails "String#reverse! raises a RuntimeError on a frozen instance that would not be modified"
|
|
9
|
+
fails "String#reverse! raises a RuntimeError on a frozen instance that is modified"
|
|
10
|
+
fails "String#reverse! reverses self in place and always returns self"
|
|
11
|
+
fails "String#downcase! raises a RuntimeError when self is frozen"
|
|
12
|
+
fails "String#downcase! returns nil if no modifications were made"
|
|
13
|
+
fails "String#downcase! modifies self in place"
|
|
14
|
+
fails "String#capitalize! raises a RuntimeError when self is frozen"
|
|
15
|
+
fails "String#capitalize! returns nil when no changes are made"
|
|
16
|
+
fails "String#capitalize! capitalizes self in place"
|
|
17
|
+
fails "String#chomp! when passed a String does not taint the result when the argument is tainted"
|
|
18
|
+
fails "String#chomp! when passed a String taints the result if self is tainted"
|
|
19
|
+
fails "String#chomp! when passed a String returns nil when self is empty"
|
|
20
|
+
fails "String#chomp! when passed a String returns nil if the argument does not match the trailing characters"
|
|
21
|
+
fails "String#chomp! when passed a String removes the trailing characters if they match the argument"
|
|
22
|
+
fails "String#chomp! when passed an Object raises a TypeError if #to_str does not return a String"
|
|
23
|
+
fails "String#chomp! when passed an Object calls #to_str to convert to a String"
|
|
24
|
+
fails "String#chomp! when passed '\\n' returns nil when self is empty"
|
|
25
|
+
fails "String#chomp! when passed '\\n' taints the result if self is tainted"
|
|
26
|
+
fails "String#chomp! when passed '\\n' removes one trailing carrige return, newline pair"
|
|
27
|
+
fails "String#chomp! when passed '\\n' removes one trailing carriage return"
|
|
28
|
+
fails "String#chomp! when passed '\\n' removes one trailing newline"
|
|
29
|
+
fails "String#chomp! when passed '' returns nil when self is empty"
|
|
30
|
+
fails "String#chomp! when passed '' taints the result if self is tainted"
|
|
31
|
+
fails "String#chomp! when passed '' removes more than one trailing carriage return, newline pairs"
|
|
32
|
+
fails "String#chomp! when passed '' removes more than one trailing newlines"
|
|
33
|
+
fails "String#chomp! when passed '' does not remove a final carriage return"
|
|
34
|
+
fails "String#chomp! when passed '' removes a final carriage return, newline"
|
|
35
|
+
fails "String#chomp! when passed '' removes a final newline"
|
|
36
|
+
fails "String#chomp! when passed nil returns nil when self is empty"
|
|
37
|
+
fails "String#chomp! when passed nil returns nil"
|
|
38
|
+
fails "String#chomp! when passed no argument removes trailing characters that match $/ when it has been assigned a value"
|
|
39
|
+
fails "String#chomp! when passed no argument returns subclass instances when called on a subclass"
|
|
40
|
+
fails "String#chomp! when passed no argument taints the result if self is tainted"
|
|
41
|
+
fails "String#chomp! when passed no argument returns nil when self is empty"
|
|
42
|
+
fails "String#chomp! when passed no argument removes one trailing carrige return, newline pair"
|
|
43
|
+
fails "String#chomp! when passed no argument removes one trailing carriage return"
|
|
44
|
+
fails "String#chomp! when passed no argument removes one trailing newline"
|
|
45
|
+
fails "String#chomp! when passed no argument returns nil if self is not modified"
|
|
46
|
+
fails "String#chomp! when passed no argument modifies self"
|
|
47
|
+
fails "String#chomp! raises a RuntimeError on a frozen instance when it would not be modified"
|
|
48
|
+
fails "String#chomp! raises a RuntimeError on a frozen instance when it is modified"
|
|
49
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
opal_filter "Private methods" do
|
|
2
|
+
fails "Array#initialize is private"
|
|
3
|
+
fails "The defined? keyword when called with a method name having a module as a receiver returns nil if the method is private"
|
|
4
|
+
fails "Array#initialize_copy is private"
|
|
5
|
+
|
|
6
|
+
fails "Hash#initialize_copy is private"
|
|
7
|
+
fails "Hash#initialize is private"
|
|
8
|
+
|
|
9
|
+
fails "Struct#initialize is private"
|
|
10
|
+
|
|
11
|
+
fails "Defining an 'initialize' method sets the method's visibility to private"
|
|
12
|
+
fails "Defining an 'initialize_copy' method sets the method's visibility to private"
|
|
13
|
+
|
|
14
|
+
fails "Invoking a private getter method does not permit self as a receiver"
|
|
15
|
+
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private"
|
|
16
|
+
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is protected"
|
|
17
|
+
|
|
18
|
+
fails "SimpleDelegator.new doesn't forward private method calls"
|
|
19
|
+
fails "SimpleDelegator.new doesn't forward private method calls even via send or __send__"
|
|
20
|
+
fails "SimpleDelegator.new forwards protected method calls"
|
|
21
|
+
|
|
22
|
+
fails "Set#initialize is private"
|
|
23
|
+
|
|
24
|
+
fails "Singleton.allocate is a private method"
|
|
25
|
+
fails "Singleton.new is a private method"
|
|
26
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
opal_filter "String subclasses" do
|
|
2
|
+
fails "String#upcase returns a subclass instance for subclasses"
|
|
3
|
+
fails "String#swapcase returns subclass instances when called on a subclass"
|
|
4
|
+
fails "String#downcase returns a subclass instance for subclasses"
|
|
5
|
+
fails "String#capitalize returns subclass instances when called on a subclass"
|
|
6
|
+
fails "String#center with length, padding returns subclass instances when called on subclasses"
|
|
7
|
+
fails "String#chomp when passed no argument returns subclass instances when called on a subclass"
|
|
8
|
+
end
|
|
@@ -14,4 +14,50 @@ opal_filter 'tainted' do
|
|
|
14
14
|
fails "Array#* with an integer copies the taint status of the original array even if the array is empty"
|
|
15
15
|
fails "Array#* with an integer copies the taint status of the original array even if the passed count is 0"
|
|
16
16
|
fails "Array#compact does not keep tainted status even if all elements are removed"
|
|
17
|
+
fails "Array#map! keeps tainted status"
|
|
18
|
+
fails "Array#map does not copy tainted status"
|
|
19
|
+
fails "Array#clone copies taint status from the original"
|
|
20
|
+
fails "Array#collect! keeps tainted status"
|
|
21
|
+
fails "Array#collect does not copy tainted status"
|
|
22
|
+
fails "Array#concat keeps tainted status"
|
|
23
|
+
fails "Array#concat keeps the tainted status of elements"
|
|
24
|
+
fails "Array#dup copies taint status from the original"
|
|
25
|
+
fails "Array#inspect taints the result if an element is tainted"
|
|
26
|
+
fails "Array#inspect does not taint the result if the Array is tainted but empty"
|
|
27
|
+
fails "Array#inspect taints the result if the Array is non-empty and tainted"
|
|
28
|
+
fails "Array#to_s taints the result if an element is tainted"
|
|
29
|
+
fails "Array#to_s does not taint the result if the Array is tainted but empty"
|
|
30
|
+
fails "Array#to_s taints the result if the Array is non-empty and tainted"
|
|
31
|
+
fails "Array#join with a tainted separator taints the result if the array has two or more elements"
|
|
32
|
+
fails "Array#join with a tainted separator does not taint the result if the array has only one element"
|
|
33
|
+
fails "Array#join with a tainted separator does not taint the result if the array is empty"
|
|
34
|
+
fails "Array#join taints the result if the result of coercing an element is tainted"
|
|
35
|
+
fails "Array#join does not taint the result if the Array is tainted but empty"
|
|
36
|
+
fails "Array#join taints the result if the Array is tainted and non-empty"
|
|
37
|
+
fails "Array#* with a string with a tainted separator taints the result if the array has two or more elements"
|
|
38
|
+
fails "Array#* with a string with a tainted separator does not taint the result if the array has only one element"
|
|
39
|
+
fails "Array#* with a string with a tainted separator does not taint the result if the array is empty"
|
|
40
|
+
|
|
41
|
+
fails "Hash#reject taints the resulting hash"
|
|
42
|
+
|
|
43
|
+
fails "Kernel#to_s returns a tainted result if self is tainted"
|
|
44
|
+
|
|
45
|
+
fails "String#upcase taints result when self is tainted"
|
|
46
|
+
fails "String#to_s taints the result when self is tainted"
|
|
47
|
+
fails "String#to_str taints the result when self is tainted"
|
|
48
|
+
fails "String#swapcase taints resulting string when self is tainted"
|
|
49
|
+
fails "String#reverse taints the result if self is tainted"
|
|
50
|
+
|
|
51
|
+
fails "Pathname.new is tainted if path is tainted"
|
|
52
|
+
fails "String#downcase taints result when self is tainted"
|
|
53
|
+
fails "String#capitalize taints resulting string when self is tainted"
|
|
54
|
+
fails "String#center with length, padding when padding is tainted and self is untainted returns a tainted string if and only if length is longer than self"
|
|
55
|
+
fails "String#center with length, padding taints result when self or padstr is tainted"
|
|
56
|
+
fails "String#chomp when passed a String does not taint the result when the argument is tainted"
|
|
57
|
+
fails "String#chomp when passed a String taints the result if self is tainted"
|
|
58
|
+
fails "String#chomp when passed '\\n' taints the result if self is tainted"
|
|
59
|
+
fails "String#chomp when passed '' taints the result if self is tainted"
|
|
60
|
+
fails "String#chomp when passed nil taints the result if self is tainted"
|
|
61
|
+
fails "String#chomp when passed nil returns a copy of the String"
|
|
62
|
+
fails "String#chomp when passed no argument taints the result if self is tainted"
|
|
17
63
|
end
|