opal-cj 0.7.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.gitmodules +27 -0
- data/.rspec +3 -0
- data/.spectator +2 -0
- data/.spectator-mspec +3 -0
- data/.travis.yml +45 -0
- data/CHANGELOG.md +406 -0
- data/CONTRIBUTING.md +41 -0
- data/Gemfile +27 -0
- data/Guardfile +77 -0
- data/LICENSE +19 -0
- data/README.md +178 -0
- data/Rakefile +116 -0
- data/benchmarks/operators.rb +11 -0
- data/bin/opal +22 -0
- data/bin/opal-build +77 -0
- data/bin/opal-mspec +10 -0
- data/bin/opal-repl +72 -0
- data/config.ru +14 -0
- data/examples/rack/Gemfile +3 -0
- data/examples/rack/app/application.rb +13 -0
- data/examples/rack/app/user.rb +21 -0
- data/examples/rack/config.ru +7 -0
- data/examples/rack/index.html.erb +10 -0
- data/examples/sinatra/Gemfile +4 -0
- data/examples/sinatra/app/application.rb +7 -0
- data/examples/sinatra/config.ru +28 -0
- data/lib/mspec/opal/main.rb.erb +9 -0
- data/lib/mspec/opal/rake_task.rb +278 -0
- data/lib/mspec/opal/runner.rb +206 -0
- data/lib/mspec/opal/sprockets.js +57 -0
- data/lib/opal.rb +11 -0
- data/lib/opal/builder.rb +135 -0
- data/lib/opal/builder_processors.rb +165 -0
- data/lib/opal/cli.rb +145 -0
- data/lib/opal/cli_options.rb +149 -0
- data/lib/opal/cli_runners.rb +10 -0
- data/lib/opal/cli_runners/nodejs.rb +56 -0
- data/lib/opal/cli_runners/phantom.js +35 -0
- data/lib/opal/cli_runners/phantomjs.rb +28 -0
- data/lib/opal/cli_runners/server.rb +54 -0
- data/lib/opal/compiler.rb +307 -0
- data/lib/opal/erb.rb +64 -0
- data/lib/opal/fragment.rb +41 -0
- data/lib/opal/hike_path_finder.rb +18 -0
- data/lib/opal/nodes.rb +26 -0
- data/lib/opal/nodes/arglist.rb +56 -0
- data/lib/opal/nodes/array.rb +54 -0
- data/lib/opal/nodes/base.rb +151 -0
- data/lib/opal/nodes/call.rb +283 -0
- data/lib/opal/nodes/call_special.rb +178 -0
- data/lib/opal/nodes/case.rb +96 -0
- data/lib/opal/nodes/class.rb +42 -0
- data/lib/opal/nodes/constants.rb +78 -0
- data/lib/opal/nodes/def.rb +157 -0
- data/lib/opal/nodes/defined.rb +113 -0
- data/lib/opal/nodes/definitions.rb +168 -0
- data/lib/opal/nodes/for.rb +35 -0
- data/lib/opal/nodes/hash.rb +67 -0
- data/lib/opal/nodes/helpers.rb +114 -0
- data/lib/opal/nodes/if.rb +67 -0
- data/lib/opal/nodes/iter.rb +131 -0
- data/lib/opal/nodes/literal.rb +230 -0
- data/lib/opal/nodes/logic.rb +217 -0
- data/lib/opal/nodes/masgn.rb +62 -0
- data/lib/opal/nodes/module.rb +46 -0
- data/lib/opal/nodes/rescue.rb +135 -0
- data/lib/opal/nodes/runtime_helpers.rb +45 -0
- data/lib/opal/nodes/scope.rb +293 -0
- data/lib/opal/nodes/singleton_class.rb +25 -0
- data/lib/opal/nodes/super.rb +97 -0
- data/lib/opal/nodes/top.rb +101 -0
- data/lib/opal/nodes/variables.rb +158 -0
- data/lib/opal/nodes/while.rb +65 -0
- data/lib/opal/nodes/yield.rb +95 -0
- data/lib/opal/parser.rb +658 -0
- data/lib/opal/parser/grammar.rb +5452 -0
- data/lib/opal/parser/grammar.y +1684 -0
- data/lib/opal/parser/keywords.rb +66 -0
- data/lib/opal/parser/lexer.rb +1208 -0
- data/lib/opal/parser/parser_scope.rb +25 -0
- data/lib/opal/parser/sexp.rb +75 -0
- data/lib/opal/path_reader.rb +28 -0
- data/lib/opal/paths.rb +38 -0
- data/lib/opal/source_map.rb +70 -0
- data/lib/opal/sprockets.rb +4 -0
- data/lib/opal/sprockets/cache_key_fix.rb +17 -0
- data/lib/opal/sprockets/environment.rb +37 -0
- data/lib/opal/sprockets/erb.rb +37 -0
- data/lib/opal/sprockets/path_reader.rb +34 -0
- data/lib/opal/sprockets/processor.rb +124 -0
- data/lib/opal/sprockets/server.rb +180 -0
- data/lib/opal/util.rb +64 -0
- data/lib/opal/version.rb +3 -0
- data/opal.gemspec +36 -0
- data/opal/README.md +6 -0
- data/opal/corelib/array.rb +1556 -0
- data/opal/corelib/array/inheritance.rb +113 -0
- data/opal/corelib/basic_object.rb +73 -0
- data/opal/corelib/boolean.rb +41 -0
- data/opal/corelib/class.rb +55 -0
- data/opal/corelib/comparable.rb +56 -0
- data/opal/corelib/complex.rb +3 -0
- data/opal/corelib/dir.rb +20 -0
- data/opal/corelib/enumerable.rb +1132 -0
- data/opal/corelib/enumerator.rb +422 -0
- data/opal/corelib/error.rb +63 -0
- data/opal/corelib/file.rb +56 -0
- data/opal/corelib/hash.rb +728 -0
- data/opal/corelib/helpers.rb +102 -0
- data/opal/corelib/io.rb +59 -0
- data/opal/corelib/kernel.rb +569 -0
- data/opal/corelib/main.rb +7 -0
- data/opal/corelib/match_data.rb +114 -0
- data/opal/corelib/method.rb +58 -0
- data/opal/corelib/module.rb +462 -0
- data/opal/corelib/nil_class.rb +62 -0
- data/opal/corelib/numeric.rb +532 -0
- data/opal/corelib/proc.rb +52 -0
- data/opal/corelib/range.rb +116 -0
- data/opal/corelib/rational.rb +3 -0
- data/opal/corelib/regexp.rb +133 -0
- data/opal/corelib/runtime.js +1240 -0
- data/opal/corelib/string.rb +1212 -0
- data/opal/corelib/string/inheritance.rb +78 -0
- data/opal/corelib/struct.rb +141 -0
- data/opal/corelib/time.rb +584 -0
- data/opal/corelib/variables.rb +24 -0
- data/opal/opal.rb +32 -0
- data/package.json +9 -0
- data/spec/filters/bugs/array.rb +232 -0
- data/spec/filters/bugs/basic_object.rb +14 -0
- data/spec/filters/bugs/class.rb +21 -0
- data/spec/filters/bugs/enumerable.rb +69 -0
- data/spec/filters/bugs/enumerator.rb +3 -0
- data/spec/filters/bugs/hash.rb +128 -0
- data/spec/filters/bugs/kernel.rb +10 -0
- data/spec/filters/bugs/language.rb +415 -0
- data/spec/filters/bugs/math.rb +95 -0
- data/spec/filters/bugs/module.rb +14 -0
- data/spec/filters/bugs/nil.rb +7 -0
- data/spec/filters/bugs/numeric.rb +20 -0
- data/spec/filters/bugs/opal.rb +14 -0
- data/spec/filters/bugs/regexp.rb +11 -0
- data/spec/filters/bugs/set.rb +7 -0
- data/spec/filters/bugs/singleton.rb +6 -0
- data/spec/filters/bugs/string.rb +360 -0
- data/spec/filters/bugs/stringscanner.rb +22 -0
- data/spec/filters/bugs/struct.rb +45 -0
- data/spec/filters/bugs/time.rb +177 -0
- data/spec/filters/bugs/unknown.rb +11 -0
- data/spec/filters/unsupported/encoding.rb +95 -0
- data/spec/filters/unsupported/enumerator.rb +14 -0
- data/spec/filters/unsupported/float.rb +5 -0
- data/spec/filters/unsupported/frozen.rb +90 -0
- data/spec/filters/unsupported/hash_compare_by_identity.rb +16 -0
- data/spec/filters/unsupported/integer_size.rb +7 -0
- data/spec/filters/unsupported/method_added.rb +10 -0
- data/spec/filters/unsupported/mutable_strings.rb +361 -0
- data/spec/filters/unsupported/private_constants.rb +30 -0
- data/spec/filters/unsupported/private_methods.rb +44 -0
- data/spec/filters/unsupported/random.rb +4 -0
- data/spec/filters/unsupported/ruby_exe.rb +5 -0
- data/spec/filters/unsupported/tainted.rb +155 -0
- data/spec/filters/unsupported/time.rb +21 -0
- data/spec/filters/unsupported/trusted.rb +80 -0
- data/spec/lib/builder_processors_spec.rb +27 -0
- data/spec/lib/builder_spec.rb +66 -0
- data/spec/lib/cli_spec.rb +134 -0
- data/spec/lib/compiler_spec.rb +197 -0
- data/spec/lib/dependency_resolver_spec.rb +40 -0
- data/spec/lib/fixtures/no_requires.rb +1 -0
- data/spec/lib/fixtures/opal_file.rb +2 -0
- data/spec/lib/fixtures/require_tree_test.rb +3 -0
- data/spec/lib/fixtures/required_tree_test/required_file1.rb +1 -0
- data/spec/lib/fixtures/required_tree_test/required_file2.rb +1 -0
- data/spec/lib/fixtures/requires.rb +7 -0
- data/spec/lib/fixtures/sprockets_file.js.rb +3 -0
- data/spec/lib/fixtures/sprockets_require_tree_test.rb +3 -0
- data/spec/lib/hike_path_finder_spec.rb +23 -0
- data/spec/lib/lexer_spec.rb +110 -0
- data/spec/lib/parser/alias_spec.rb +26 -0
- data/spec/lib/parser/and_spec.rb +13 -0
- data/spec/lib/parser/attrasgn_spec.rb +28 -0
- data/spec/lib/parser/begin_spec.rb +42 -0
- data/spec/lib/parser/block_spec.rb +12 -0
- data/spec/lib/parser/break_spec.rb +17 -0
- data/spec/lib/parser/call_spec.rb +139 -0
- data/spec/lib/parser/class_spec.rb +35 -0
- data/spec/lib/parser/comments_spec.rb +11 -0
- data/spec/lib/parser/def_spec.rb +61 -0
- data/spec/lib/parser/if_spec.rb +26 -0
- data/spec/lib/parser/iter_spec.rb +59 -0
- data/spec/lib/parser/lambda_spec.rb +64 -0
- data/spec/lib/parser/literal_spec.rb +118 -0
- data/spec/lib/parser/masgn_spec.rb +37 -0
- data/spec/lib/parser/module_spec.rb +27 -0
- data/spec/lib/parser/not_spec.rb +27 -0
- data/spec/lib/parser/op_asgn1_spec.rb +23 -0
- data/spec/lib/parser/op_asgn2_spec.rb +23 -0
- data/spec/lib/parser/or_spec.rb +13 -0
- data/spec/lib/parser/return_spec.rb +17 -0
- data/spec/lib/parser/sclass_spec.rb +21 -0
- data/spec/lib/parser/string_spec.rb +276 -0
- data/spec/lib/parser/super_spec.rb +20 -0
- data/spec/lib/parser/unary_spec.rb +48 -0
- data/spec/lib/parser/undef_spec.rb +15 -0
- data/spec/lib/parser/unless_spec.rb +13 -0
- data/spec/lib/parser/variables_spec.rb +92 -0
- data/spec/lib/parser/while_spec.rb +15 -0
- data/spec/lib/parser/yield_spec.rb +20 -0
- data/spec/lib/path_reader_spec.rb +24 -0
- data/spec/lib/shared/path_finder_shared.rb +19 -0
- data/spec/lib/shared/path_reader_shared.rb +31 -0
- data/spec/lib/spec_helper.rb +9 -0
- data/spec/lib/sprockets/environment_spec.rb +30 -0
- data/spec/lib/sprockets/erb_spec.rb +25 -0
- data/spec/lib/sprockets/path_reader_spec.rb +25 -0
- data/spec/lib/sprockets/processor_spec.rb +35 -0
- data/spec/lib/sprockets/server_spec.rb +20 -0
- data/spec/opal/compiler/irb_spec.rb +44 -0
- data/spec/opal/core/array/select_spec.rb +14 -0
- data/spec/opal/core/array/set_range_to_array_spec.rb +7 -0
- data/spec/opal/core/date_spec.rb +122 -0
- data/spec/opal/core/enumerable/all_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/any_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/collect_break_spec.rb +13 -0
- data/spec/opal/core/enumerable/count_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/detect_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/drop_while_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/each_slice_break.rb +6 -0
- data/spec/opal/core/enumerable/each_with_index_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/each_with_object_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/find_all_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/find_index_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/grep_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/max_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/max_by_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/min_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/min_by_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/none_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/one_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/reduce_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/take_while_break_spec.rb +5 -0
- data/spec/opal/core/fixtures/class.rb +124 -0
- data/spec/opal/core/fixtures/class_variables.rb +0 -0
- data/spec/opal/core/fixtures/constants.rb +33 -0
- data/spec/opal/core/fixtures/require_tree_files/file 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 3.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 4.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 5.rb +1 -0
- data/spec/opal/core/kernel/Array_spec.rb +10 -0
- data/spec/opal/core/kernel/block_given_spec.rb +30 -0
- data/spec/opal/core/kernel/class_spec.rb +6 -0
- data/spec/opal/core/kernel/define_singleton_method_spec.rb +21 -0
- data/spec/opal/core/kernel/equal_value_spec.rb +12 -0
- data/spec/opal/core/kernel/extend_spec.rb +21 -0
- data/spec/opal/core/kernel/format_spec.rb +122 -0
- data/spec/opal/core/kernel/freeze_spec.rb +15 -0
- data/spec/opal/core/kernel/instance_eval_spec.rb +28 -0
- data/spec/opal/core/kernel/instance_variable_defined_spec.rb +15 -0
- data/spec/opal/core/kernel/instance_variable_get_spec.rb +14 -0
- data/spec/opal/core/kernel/instance_variable_set_spec.rb +10 -0
- data/spec/opal/core/kernel/loop_spec.rb +23 -0
- data/spec/opal/core/kernel/match_spec.rb +5 -0
- data/spec/opal/core/kernel/method_spec.rb +31 -0
- data/spec/opal/core/kernel/methods_spec.rb +25 -0
- data/spec/opal/core/kernel/nil_spec.rb +7 -0
- data/spec/opal/core/kernel/p_spec.rb +15 -0
- data/spec/opal/core/kernel/printf_spec.rb +11 -0
- data/spec/opal/core/kernel/proc_spec.rb +13 -0
- data/spec/opal/core/kernel/rand_spec.rb +23 -0
- data/spec/opal/core/kernel/require_tree_spec.rb +7 -0
- data/spec/opal/core/kernel/respond_to_spec.rb +41 -0
- data/spec/opal/core/kernel/send_spec.rb +56 -0
- data/spec/opal/core/kernel/sprintf_spec.rb +5 -0
- data/spec/opal/core/language/block_spec.rb +538 -0
- data/spec/opal/core/language/fixtures/array.rb +11 -0
- data/spec/opal/core/language/fixtures/block.rb +57 -0
- data/spec/opal/core/language/fixtures/break.rb +240 -0
- data/spec/opal/core/language/fixtures/ensure.rb +72 -0
- data/spec/opal/core/language/fixtures/literal_lambda.rb +7 -0
- data/spec/opal/core/language/fixtures/metaclass.rb +33 -0
- data/spec/opal/core/language/fixtures/module.rb +24 -0
- data/spec/opal/core/language/fixtures/next.rb +128 -0
- data/spec/opal/core/language/fixtures/return.rb +118 -0
- data/spec/opal/core/language/fixtures/send.rb +110 -0
- data/spec/opal/core/language/fixtures/send_1.9.rb +22 -0
- data/spec/opal/core/language/fixtures/super.rb +308 -0
- data/spec/opal/core/language/fixtures/variables.rb +58 -0
- data/spec/opal/core/language/fixtures/yield.rb +28 -0
- data/spec/opal/core/language/predefined_spec.rb +85 -0
- data/spec/opal/core/language/proc_spec.rb +263 -0
- data/spec/opal/core/language/regexp_spec.rb +20 -0
- data/spec/opal/core/language/send_spec.rb +225 -0
- data/spec/opal/core/language/string_spec.rb +44 -0
- data/spec/opal/core/language/symbol_spec.rb +40 -0
- data/spec/opal/core/language/variables_spec.rb +1366 -0
- data/spec/opal/core/language/versions/array_1.9.rb +39 -0
- data/spec/opal/core/language/versions/block_1.9.rb +0 -0
- data/spec/opal/core/language/versions/break_1.9.rb +0 -0
- data/spec/opal/core/language/versions/case_1.9.rb +20 -0
- data/spec/opal/core/language/versions/hash_1.9.rb +18 -0
- data/spec/opal/core/language/versions/literal_lambda_1.9.rb +143 -0
- data/spec/opal/core/language/versions/not_1.9.rb +22 -0
- data/spec/opal/core/language/versions/send_1.9.rb +241 -0
- data/spec/opal/core/language/versions/symbol_1.9.rb +15 -0
- data/spec/opal/core/language/versions/variables_1.9.rb +8 -0
- data/spec/opal/core/module/alias_method_spec.rb +28 -0
- data/spec/opal/core/module/ancestors_spec.rb +11 -0
- data/spec/opal/core/module/append_features_spec.rb +14 -0
- data/spec/opal/core/module/attr_accessor_spec.rb +26 -0
- data/spec/opal/core/module/const_defined_spec.rb +85 -0
- data/spec/opal/core/module/const_get_spec.rb +85 -0
- data/spec/opal/core/module/const_missing_spec.rb +17 -0
- data/spec/opal/core/module/const_set_spec.rb +64 -0
- data/spec/opal/core/module/constants_spec.rb +49 -0
- data/spec/opal/core/module/fixtures/classes.rb +434 -0
- data/spec/opal/core/module/method_defined_spec.rb +48 -0
- data/spec/opal/core/module/module_function_spec.rb +25 -0
- data/spec/opal/core/module/name_spec.rb +52 -0
- data/spec/opal/core/module/public_method_defined_spec.rb +18 -0
- data/spec/opal/core/module/remove_const_spec.rb +22 -0
- data/spec/opal/core/module/undef_method_spec.rb +66 -0
- data/spec/opal/core/numeric/bit_and_spec.rb +7 -0
- data/spec/opal/core/numeric/bit_or_spec.rb +8 -0
- data/spec/opal/core/numeric/bit_xor_spec.rb +6 -0
- data/spec/opal/core/numeric/ceil_spec.rb +8 -0
- data/spec/opal/core/numeric/chr_spec.rb +8 -0
- data/spec/opal/core/numeric/comparison_spec.rb +24 -0
- data/spec/opal/core/numeric/complement_spec.rb +8 -0
- data/spec/opal/core/numeric/divide_spec.rb +10 -0
- data/spec/opal/core/numeric/eql_spec.rb +9 -0
- data/spec/opal/core/numeric/exponent_spec.rb +33 -0
- data/spec/opal/core/numeric/floor_spec.rb +8 -0
- data/spec/opal/core/numeric/gt_spec.rb +11 -0
- data/spec/opal/core/numeric/gte_spec.rb +12 -0
- data/spec/opal/core/numeric/integer_spec.rb +9 -0
- data/spec/opal/core/numeric/left_shift_spec.rb +21 -0
- data/spec/opal/core/numeric/lt_spec.rb +11 -0
- data/spec/opal/core/numeric/lte_spec.rb +12 -0
- data/spec/opal/core/numeric/minus_spec.rb +8 -0
- data/spec/opal/core/numeric/modulo_spec.rb +19 -0
- data/spec/opal/core/numeric/multiply_spec.rb +9 -0
- data/spec/opal/core/numeric/next_spec.rb +9 -0
- data/spec/opal/core/numeric/ord_spec.rb +9 -0
- data/spec/opal/core/numeric/plus_spec.rb +8 -0
- data/spec/opal/core/numeric/pred_spec.rb +7 -0
- data/spec/opal/core/numeric/right_shift_spec.rb +25 -0
- data/spec/opal/core/numeric/step_spec.rb +11 -0
- data/spec/opal/core/numeric/succ_spec.rb +9 -0
- data/spec/opal/core/numeric/times_spec.rb +36 -0
- data/spec/opal/core/numeric/to_f_spec.rb +7 -0
- data/spec/opal/core/numeric/to_i_spec.rb +7 -0
- data/spec/opal/core/numeric/to_json_spec.rb +8 -0
- data/spec/opal/core/numeric/to_s_spec.rb +26 -0
- data/spec/opal/core/numeric/uminus_spec.rb +9 -0
- data/spec/opal/core/numeric/upto_spec.rb +19 -0
- data/spec/opal/core/numeric/zero_spec.rb +7 -0
- data/spec/opal/core/proc/call_spec.rb +21 -0
- data/spec/opal/core/proc/element_reference_spec.rb +21 -0
- data/spec/opal/core/proc/proc_tricks_spec.rb +7 -0
- data/spec/opal/core/runtime/begin_spec.rb +39 -0
- data/spec/opal/core/runtime/block_send_spec.rb +28 -0
- data/spec/opal/core/runtime/block_spec.rb +23 -0
- data/spec/opal/core/runtime/bridged_classes_spec.rb +64 -0
- data/spec/opal/core/runtime/constants_spec.rb +13 -0
- data/spec/opal/core/runtime/eval_spec.rb +5 -0
- data/spec/opal/core/runtime/main_methods_spec.rb +27 -0
- data/spec/opal/core/runtime/method_missing_spec.rb +62 -0
- data/spec/opal/core/runtime/method_spec.rb +31 -0
- data/spec/opal/core/runtime/operator_call_spec.rb +13 -0
- data/spec/opal/core/runtime/paren_spec.rb +14 -0
- data/spec/opal/core/runtime/rescue_spec.rb +38 -0
- data/spec/opal/core/runtime/return_spec.rb +38 -0
- data/spec/opal/core/runtime/send_spec.rb +34 -0
- data/spec/opal/core/runtime/singleton_class_spec.rb +13 -0
- data/spec/opal/core/runtime/super_spec.rb +212 -0
- data/spec/opal/core/runtime/truthy_spec.rb +23 -0
- data/spec/opal/core/runtime/variables_spec.rb +20 -0
- data/spec/opal/core/source_map_spec.rb +15 -0
- data/spec/opal/core/string_spec.rb +11 -0
- data/spec/opal/stdlib/erb/erb_spec.rb +30 -0
- data/spec/opal/stdlib/erb/inline_block.opalerb +3 -0
- data/spec/opal/stdlib/erb/quoted.opalerb +1 -0
- data/spec/opal/stdlib/erb/simple.opalerb +1 -0
- data/spec/opal/stdlib/json/ext_spec.rb +48 -0
- data/spec/opal/stdlib/json/parse_spec.rb +33 -0
- data/spec/opal/stdlib/native/alias_native_spec.rb +27 -0
- data/spec/opal/stdlib/native/each_spec.rb +13 -0
- data/spec/opal/stdlib/native/element_reference_spec.rb +16 -0
- data/spec/opal/stdlib/native/exposure_spec.rb +33 -0
- data/spec/opal/stdlib/native/ext_spec.rb +19 -0
- data/spec/opal/stdlib/native/initialize_spec.rb +17 -0
- data/spec/opal/stdlib/native/method_missing_spec.rb +51 -0
- data/spec/opal/stdlib/native/native_reader_spec.rb +22 -0
- data/spec/opal/stdlib/native/native_writer_spec.rb +30 -0
- data/spec/opal/stdlib/native/new_spec.rb +8 -0
- data/spec/opal/stdlib/promise/error_spec.rb +15 -0
- data/spec/opal/stdlib/promise/rescue_spec.rb +35 -0
- data/spec/opal/stdlib/promise/then_spec.rb +54 -0
- data/spec/opal/stdlib/promise/trace_spec.rb +35 -0
- data/spec/opal/stdlib/promise/value_spec.rb +15 -0
- data/spec/opal/stdlib/promise/when_spec.rb +34 -0
- data/spec/opal/stdlib/template/paths_spec.rb +10 -0
- data/spec/opal/stdlib/thread/mutex_spec.rb +40 -0
- data/spec/opal/stdlib/thread/thread_queue_spec.rb +32 -0
- data/spec/opal/stdlib/thread/thread_spec.rb +60 -0
- data/spec/rubyspecs +329 -0
- data/spec/spec_helper.rb +42 -0
- data/spec/support/mspec_rspec_adapter.rb +33 -0
- data/spec/support/parser_helpers.rb +37 -0
- data/stdlib/README.md +3 -0
- data/stdlib/base64.rb +152 -0
- data/stdlib/benchmark.rb +10 -0
- data/stdlib/buffer.rb +40 -0
- data/stdlib/buffer/array.rb +66 -0
- data/stdlib/buffer/view.rb +70 -0
- data/stdlib/date.rb +170 -0
- data/stdlib/delegate.rb +29 -0
- data/stdlib/dir.rb +1 -0
- data/stdlib/encoding.rb +166 -0
- data/stdlib/enumerator.rb +1 -0
- data/stdlib/erb.rb +16 -0
- data/stdlib/file.rb +1 -0
- data/stdlib/forwardable.rb +71 -0
- data/stdlib/json.rb +182 -0
- data/stdlib/math.rb +370 -0
- data/stdlib/native.rb +530 -0
- data/stdlib/nodejs.rb +5 -0
- data/stdlib/nodejs/dir.rb +13 -0
- data/stdlib/nodejs/file.rb +98 -0
- data/stdlib/nodejs/fileutils.rb +26 -0
- data/stdlib/nodejs/io.rb +2 -0
- data/stdlib/nodejs/irb.rb +45 -0
- data/stdlib/nodejs/process.rb +16 -0
- data/stdlib/nodejs/require.rb +32 -0
- data/stdlib/nodejs/rubygems.rb +68 -0
- data/stdlib/nodejs/runtime.rb +25 -0
- data/stdlib/nodejs/yaml.rb +11 -0
- data/stdlib/observer.rb +202 -0
- data/stdlib/opal-parser.rb +53 -0
- data/stdlib/opal-source-maps.rb +2 -0
- data/stdlib/ostruct.rb +69 -0
- data/stdlib/pathname.rb +31 -0
- data/stdlib/phantomjs.rb +8 -0
- data/stdlib/pp.rb +12 -0
- data/stdlib/process.rb +10 -0
- data/stdlib/promise.rb +300 -0
- data/stdlib/racc/parser.rb +215 -0
- data/stdlib/rbconfig.rb +20 -0
- data/stdlib/securerandom.rb +12 -0
- data/stdlib/set.rb +116 -0
- data/stdlib/singleton.rb +40 -0
- data/stdlib/source_map.rb +5 -0
- data/stdlib/source_map/map.rb +220 -0
- data/stdlib/source_map/mapping.rb +26 -0
- data/stdlib/source_map/offset.rb +88 -0
- data/stdlib/source_map/version.rb +3 -0
- data/stdlib/source_map/vlq.rb +98 -0
- data/stdlib/sourcemap.rb +1 -0
- data/stdlib/stringio.rb +181 -0
- data/stdlib/strscan.rb +155 -0
- data/stdlib/template.rb +46 -0
- data/stdlib/thread.rb +160 -0
- data/stdlib/time.rb +9 -0
- data/tasks/github.rake +19 -0
- metadata +690 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eb58bde563ad0bc20ce86bbd77e4a7bff7aba0cf
|
4
|
+
data.tar.gz: eb0bc6d2676c0aa83aa271b6c619df7fa9a9c3d2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 15a9786881b385f168d110728361cb64077300ae4e517eab09d887e5160db1c16b4df3dad76cd98647325c88ce23c0c7bc4edb83b8304fdc9851b2477cb0c378
|
7
|
+
data.tar.gz: eb73a43fc98d01f54b44663a7c1e63fa624ec6ffe4bed7fa4f02b63898be3e9cdad7d6fec21fdd0363e9a17c20e875b7a7a8a6c06de563111d658f31acd12b7b
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
[submodule "spec/corelib"]
|
2
|
+
path = spec/corelib
|
3
|
+
url = https://github.com/rubyspec/rubyspec
|
4
|
+
[submodule "spec/stdlib/rubysl-singleton"]
|
5
|
+
path = spec/stdlib/rubysl-singleton
|
6
|
+
url = https://github.com/rubysl/rubysl-singleton
|
7
|
+
[submodule "spec/stdlib/rubysl-observer"]
|
8
|
+
path = spec/stdlib/rubysl-observer
|
9
|
+
url = https://github.com/rubysl/rubysl-observer
|
10
|
+
[submodule "spec/stdlib/rubysl-strscan"]
|
11
|
+
path = spec/stdlib/rubysl-strscan
|
12
|
+
url = https://github.com/rubysl/rubysl-strscan
|
13
|
+
[submodule "spec/stdlib/rubysl-delegate"]
|
14
|
+
path = spec/stdlib/rubysl-delegate
|
15
|
+
url = https://github.com/rubysl/rubysl-delegate
|
16
|
+
[submodule "spec/stdlib/rubysl-erb"]
|
17
|
+
path = spec/stdlib/rubysl-erb
|
18
|
+
url = https://github.com/rubysl/rubysl-erb
|
19
|
+
[submodule "spec/stdlib/rubysl-set"]
|
20
|
+
path = spec/stdlib/rubysl-set
|
21
|
+
url = https://github.com/rubysl/rubysl-set
|
22
|
+
[submodule "spec/stdlib/rubysl-pathname"]
|
23
|
+
path = spec/stdlib/rubysl-pathname
|
24
|
+
url = https://github.com/rubysl/rubysl-pathname
|
25
|
+
[submodule "spec/stdlib/rubysl-date"]
|
26
|
+
path = spec/stdlib/rubysl-date
|
27
|
+
url = https://github.com/rubysl/rubysl-date
|
data/.rspec
ADDED
data/.spectator
ADDED
data/.spectator-mspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
cache: bundler
|
4
|
+
|
5
|
+
matrix:
|
6
|
+
fast_finish: true
|
7
|
+
|
8
|
+
include:
|
9
|
+
- rvm: 2.1.1
|
10
|
+
env: RUN=default
|
11
|
+
|
12
|
+
- rvm: 1.9.3
|
13
|
+
env: RUN=rspec
|
14
|
+
|
15
|
+
- rvm: 2.0.0
|
16
|
+
env: RUN=rspec
|
17
|
+
|
18
|
+
- rvm: rbx
|
19
|
+
env: RUN=rspec
|
20
|
+
|
21
|
+
- rvm: jruby
|
22
|
+
env: RUN=rspec
|
23
|
+
|
24
|
+
allow_failures:
|
25
|
+
- rvm: 1.8.7
|
26
|
+
- rvm: 1.9.3
|
27
|
+
- rvm: 2.0.0
|
28
|
+
- rvm: rbx
|
29
|
+
- rvm: jruby
|
30
|
+
|
31
|
+
# Setting TimeZone. We'll need to do this in order to
|
32
|
+
# have the TZ related failures surface on Travis CI.
|
33
|
+
# http://stackoverflow.com/a/23374438/601782
|
34
|
+
before_install:
|
35
|
+
- git submodule update --init
|
36
|
+
|
37
|
+
script:
|
38
|
+
- "bundle exec rake $RUN"
|
39
|
+
|
40
|
+
notifications:
|
41
|
+
irc: "irc.freenode.org#opal"
|
42
|
+
webhooks:
|
43
|
+
urls:
|
44
|
+
- https://webhooks.gitter.im/e/2ea12333adebda0c2289
|
45
|
+
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,406 @@
|
|
1
|
+
## edge (upcoming 0.7)
|
2
|
+
|
3
|
+
* Fixed `-@` unary op. precedence with a numeric and followed by a method call (e.g. `-1.foo` was parsed as `-(1.foo)`)
|
4
|
+
|
5
|
+
* `require_relative` (with strings) is now preprocessed, expanded and added to `Compiler#requires`
|
6
|
+
|
7
|
+
* Rewritten the require system to respect requires position (previously all the requires were stacked up at the top of the file)
|
8
|
+
|
9
|
+
* Implement for-loop syntax
|
10
|
+
|
11
|
+
* Add Array#|
|
12
|
+
|
13
|
+
* Fix Range.new to raise `ArgumentError` on contructor values that cannot
|
14
|
+
be compared
|
15
|
+
|
16
|
+
* Fix compiler bug where Contiguous strings were not getting concatenated.
|
17
|
+
|
18
|
+
* Cleanup generated code for constant access. All constant lookups now go through `$scope.get('CONST_NAME')` to produce cleaner code and a unified place for const missing dispatch.
|
19
|
+
|
20
|
+
* Remove `const_missing` option from compiler. All constant lookups are now strict.
|
21
|
+
|
22
|
+
* Add initial support for Module#autoload.
|
23
|
+
|
24
|
+
## 0.6.2 2014-04-25
|
25
|
+
|
26
|
+
* Added Range#size
|
27
|
+
|
28
|
+
* `opal` executable now reads STDIN when no file or `-e` are passed
|
29
|
+
|
30
|
+
* `opal` executable doesn't exit after showing version on `-v` if other options are passed
|
31
|
+
|
32
|
+
* (Internal) improved the mspec runner
|
33
|
+
|
34
|
+
## 0.6.1 2014-04-15
|
35
|
+
|
36
|
+
* Updated RubySpecs to master and added `rubysl-*` specs. Thanks to Mike Owens (@mieko)
|
37
|
+
|
38
|
+
* Added `Kernel#require_remote(url)` in `opal-parser` that requires files with basic synchronous ajax
|
39
|
+
GET requests. It is used to load `<scripts type="text/ruby" src="…url…">`.
|
40
|
+
|
41
|
+
* Various parsing fixes (Hash parsing, `def` returns method name, cleanup `core/util`, Enumerator fixes)
|
42
|
+
|
43
|
+
* Added `#native_reader`, `#native_writer` and `#native_accessor`as class methods
|
44
|
+
donated by `include Native`
|
45
|
+
|
46
|
+
* Added specs for Sprockets' processors (both .js.rb and .opalerb), backported from `opal-rails`
|
47
|
+
|
48
|
+
* Set 2.1.1 as RUBY_VERSION
|
49
|
+
|
50
|
+
* Add `opal-build` command utility to easily build libraries to js
|
51
|
+
|
52
|
+
* Add `opal-repl` to gemspec executables,
|
53
|
+
previously was only available by using Opal from source
|
54
|
+
|
55
|
+
* Fix parsing `=>` in hash literals where it would sometimes incorrectly
|
56
|
+
parse as a key name.
|
57
|
+
|
58
|
+
## 0.6.0 2014-03-05
|
59
|
+
|
60
|
+
* Fix parsing of escapes in single-strings ('foo\n'). Only ' and \
|
61
|
+
characters now get escaped in single quoted strings. Also, more escape
|
62
|
+
sequences in double-quoted strings are now supported: `\a`, `\v`, `\f`,
|
63
|
+
`\e`, `\s`, octal (`\314`), hex (`\xff`) and unicode (`\u1234`).
|
64
|
+
|
65
|
+
* Sourcemaps revamp. Lexer now tracks column and line info for every token to
|
66
|
+
produce much more accurate sourcemaps. All method calls are now located on
|
67
|
+
the correct source line, and multi-line xstrings are now split to generate
|
68
|
+
a map line-to-line for long inline javascript parts.
|
69
|
+
|
70
|
+
* Merged sprockets support from `opal-sprockets` directly into Opal. For the
|
71
|
+
next release, the exernal `opal-sprockets` gem is no longer needed. This
|
72
|
+
commit adds `Opal::Processor`, `Opal::Server` and `Opal::Environment`.
|
73
|
+
|
74
|
+
* Introduce pre-processed if directives to hide code from Opal. Two special
|
75
|
+
constant checks now take place in the compiler. Either `RUBY_ENGINE` or
|
76
|
+
`RUBY_PLATFORM` when `== "opal"`. Both if and unless statements can pick
|
77
|
+
up these logic checks:
|
78
|
+
|
79
|
+
if RUBY_ENGINE == "opal"
|
80
|
+
# this code compiles
|
81
|
+
else
|
82
|
+
# this code never compiles
|
83
|
+
end
|
84
|
+
|
85
|
+
Unless:
|
86
|
+
|
87
|
+
unless RUBY_ENGINE == "opal"
|
88
|
+
# this code never compiles
|
89
|
+
end
|
90
|
+
|
91
|
+
This is particularly useful for avoiding `require()` statements being
|
92
|
+
picked up, which are included at compile time.
|
93
|
+
|
94
|
+
* Add special `debugger` method to compiler. Compiles down to javascript
|
95
|
+
`debugger` keyword to start in-browser debug console.
|
96
|
+
|
97
|
+
* Add missing string escapes to `read_escape` in lexer. Now most ruby escape
|
98
|
+
sequences are properly detected and handled in string parsing.
|
99
|
+
|
100
|
+
* Disable escapes inside x-strings. This means no more double escaping all
|
101
|
+
characters in x-strings and backticks. (`\n` => `\n`).
|
102
|
+
|
103
|
+
* Add `time.rb` to stdlib and moved `Time.parse()` and `Time.iso8601()`
|
104
|
+
methods there.
|
105
|
+
|
106
|
+
* `!` is now treated as an unary method call on the object. Opal now parsed
|
107
|
+
`!` as a def method name, and implements the method on `BasicObject`,
|
108
|
+
`NilClass` and `Boolean`.
|
109
|
+
|
110
|
+
* Fixed bug where true/false as object literals from javascript were not
|
111
|
+
correctly being detected as truthy/falsy respectively. This is due to the
|
112
|
+
javascript "feature" where `new Boolean(false) !== false`.
|
113
|
+
|
114
|
+
* Moved `native.rb` to stdlib. Native support must now be explicitly required
|
115
|
+
into Opal. `Native` is also now a module, instead of a top level class.
|
116
|
+
Also added `Native::Object#respond_to?`.
|
117
|
+
|
118
|
+
* Remove all core `#as_json()` methods from `json.rb`. Added them externally
|
119
|
+
to `opal-activesupport`.
|
120
|
+
|
121
|
+
* `Kernel#respond_to?` now calls `#respond_to_missing?` for compliance.
|
122
|
+
|
123
|
+
* Fix various `String` methods and add relevant rubyspecs for them. `#chars`,
|
124
|
+
`#to_f`, `#clone`, `#split`.
|
125
|
+
|
126
|
+
* Fix `Array` method compliance: `#first`, `#fetch`, `#insert`, `#delete_at`,
|
127
|
+
`#last`, `#splice`, `.try_convert`.
|
128
|
+
|
129
|
+
* Fix compliance of `Kernel#extend` and ensure it calls `#extended()` hook.
|
130
|
+
|
131
|
+
* Fix bug where sometimes the wrong regexp flags would be generated in the
|
132
|
+
output javascript.
|
133
|
+
|
134
|
+
* Support parsing `__END__` constructs in ruby code, inside the lexer. The
|
135
|
+
content is gathered up by use of the parser. The special constant `DATA`
|
136
|
+
is then available inside the ruby code to read the content.
|
137
|
+
|
138
|
+
* Support single character strings (using ? prefix) with escaped characters.
|
139
|
+
|
140
|
+
* Fix lexer to detect dereferencing on local variables even when whitespace
|
141
|
+
is present (`a = 0; a [0]` parses as a deference on a).
|
142
|
+
|
143
|
+
* Fix various `Struct` methods. Fixed `#each` and `#each_pair` to return
|
144
|
+
self. Add `Struct.[]` as synonym for `Struct.new`.
|
145
|
+
|
146
|
+
* Implemented some `Enumerable` methods: `#collect_concat`, `#flat_map`,
|
147
|
+
`#reject`, `#reverse_each`, `#partition` and `#zip`.
|
148
|
+
|
149
|
+
* Support any Tilt template for `index_path` in `Opal::Server`. All index
|
150
|
+
files are now run through `Tilt` (now supports haml etc).
|
151
|
+
|
152
|
+
* Fix code generation of `op_asgn_1` calls (`foo[val] += 10`).
|
153
|
+
|
154
|
+
* Add `base64` to stdlib.
|
155
|
+
|
156
|
+
* Add promises implementation to stdlib.
|
157
|
+
|
158
|
+
* Add `Math` module to corelib.
|
159
|
+
|
160
|
+
* Use `//#` instead of `//@` deprecated syntax for sourceMappingURL.
|
161
|
+
|
162
|
+
* Implicitly require `erb` from stdlib when including erb templates.
|
163
|
+
|
164
|
+
* Fix `Regexp.escape` to also escape '(' character.
|
165
|
+
|
166
|
+
* Support '<' and '>' as matching pairs in string boundrys `%q<hi>`.
|
167
|
+
|
168
|
+
* `Opal::Server` no longer searches for an index file if not specified.
|
169
|
+
|
170
|
+
* Move `Math` and `Encoding` to stdlib. Can be required using
|
171
|
+
`require 'math'`, etc.
|
172
|
+
|
173
|
+
* Fix some stdlib `Date` methods.
|
174
|
+
|
175
|
+
* Fix `Regexp.escape` to properly escape \n, \t, \r, \f characters.
|
176
|
+
|
177
|
+
* Add `Regexp.quote` as an alias of `escape`.
|
178
|
+
|
179
|
+
## 0.5.5 2013-11-25
|
180
|
+
|
181
|
+
* Fix regression: add `%i[foo bar]` style words back to lexer
|
182
|
+
|
183
|
+
* Move corelib from `opal/core` to `opal/corelib`. This stops files in
|
184
|
+
`core/` clashing with user files.
|
185
|
+
|
186
|
+
## 0.5.4 2013-11-20
|
187
|
+
|
188
|
+
* Reverted `RUBY_VERSION` to `1.9.3`. Opal `0.6.0` will be the first release
|
189
|
+
for `2.0.0`.
|
190
|
+
|
191
|
+
## 0.5.3 2013-11-12
|
192
|
+
|
193
|
+
* Opal now targets ruby 2.0.0
|
194
|
+
|
195
|
+
* Named function inside class body now generates with `$` prefix, e.g.
|
196
|
+
`$MyClass`. This makes it easier to wrap/bridge native functions.
|
197
|
+
|
198
|
+
* Support Array subclasses
|
199
|
+
|
200
|
+
* Various fixes to `String`, `Kernel` and other core classes
|
201
|
+
|
202
|
+
* Fix `Method#call` to use correct receiver
|
203
|
+
|
204
|
+
* Fix `Module#define_method` to call `#to_proc` on explicit argument
|
205
|
+
|
206
|
+
* Fix `super()` dispatches on class methods
|
207
|
+
|
208
|
+
* Support `yield()` calls from inside a block (inside a method)
|
209
|
+
|
210
|
+
* Cleanup string parsing inside lexer
|
211
|
+
|
212
|
+
* Cleanup parser/lexer to use `t` and `k` prefixes for all tokens
|
213
|
+
|
214
|
+
## 0.5.2 2013-11-11
|
215
|
+
|
216
|
+
* Include native into corelib for 0.5.x
|
217
|
+
|
218
|
+
## 0.5.1 2013-11-10
|
219
|
+
|
220
|
+
* Move all corelib under `core/` directory to prevent filename clashes with
|
221
|
+
`require`
|
222
|
+
|
223
|
+
* Move `native.rb` into stdlib - must now be explicitly required
|
224
|
+
|
225
|
+
* Implement `BasicObject#__id__`
|
226
|
+
|
227
|
+
* Cleanup and fix various `Enumerable` methods
|
228
|
+
|
229
|
+
## 0.5.0 2013-11-03
|
230
|
+
|
231
|
+
* WIP: https://gist.github.com/elia/7747460
|
232
|
+
|
233
|
+
## 0.4.2 2013-07-03
|
234
|
+
|
235
|
+
* Added `Kernel#rand`. (fntzr)
|
236
|
+
|
237
|
+
* Restored the `bin/opal` executable in gemspec.
|
238
|
+
|
239
|
+
* Now `.valueOf()` is used in `#to_n` of Boolean, Numeric, Regexp and String
|
240
|
+
to return the naked JavaScript value instead of a wrapping object.
|
241
|
+
|
242
|
+
* Parser now wraps or-ops in paranthesis to stop variable order from
|
243
|
+
leaking out when minified by uglify. We now have code in this
|
244
|
+
format: `(((tmp = lhs) !== false || !==nil) ? tmp : rhs)`.
|
245
|
+
|
246
|
+
## 0.4.1 2013-06-16
|
247
|
+
|
248
|
+
* Move sprockets logic out to external opal-sprockets gem. That now
|
249
|
+
handles the compiling and loading of opal files in sprockets.
|
250
|
+
|
251
|
+
## 0.4.0 2013-06-15
|
252
|
+
|
253
|
+
* Added fragments to parser. All parser methods now generate one or
|
254
|
+
more Fragments which store the original sexp. This allows us to
|
255
|
+
enumerate over them after parsing to map generated lines back to
|
256
|
+
original line numbers.
|
257
|
+
|
258
|
+
* Reverted `null` for `nil`. Too buggy at this time.
|
259
|
+
|
260
|
+
* Add Opal::SprocketsParser as Parser subclass for handling parsing
|
261
|
+
for sprockets environment. This subclass handles require statements
|
262
|
+
and stores them for sprockets to use.
|
263
|
+
|
264
|
+
* Add :irb option to parser to keep top level lvars stored inside
|
265
|
+
opal runtime so that an irb session can be persisted and maintain
|
266
|
+
access to local variables.
|
267
|
+
|
268
|
+
* Add Opal::Environment#use_gem() helper to add a gem to opals load
|
269
|
+
path.
|
270
|
+
|
271
|
+
* Stop pre-setting ivars to `nil`. This is no longer needed as `nil`
|
272
|
+
is now `null` or `undefined`.
|
273
|
+
|
274
|
+
* Use `null` as `nil` in opal. This allows us to send methods to
|
275
|
+
`null` and `undefined`, and both act as `nil`. This makes opal a
|
276
|
+
much better javascript citizen. **REVERTED**
|
277
|
+
|
278
|
+
* Add Enumerable#none? with specs.
|
279
|
+
|
280
|
+
* Add Opal.block_send() runtime helper for sending methods to an
|
281
|
+
object which uses a block.
|
282
|
+
|
283
|
+
* Remove \_klass variable for denoting ruby classes, and use
|
284
|
+
constructor instead. constructor is a javascript property used for
|
285
|
+
the same purpose, and this makes opal fit in as a better js citizen.
|
286
|
+
|
287
|
+
* Add Class.bridge\_class method to bridge a native constructor into an
|
288
|
+
opal class which will set it up with all methods from Object, as
|
289
|
+
well as giving it a scope and name.
|
290
|
+
|
291
|
+
* Added native #[]= and #to_h methods, for setting properties and
|
292
|
+
converting to a hash respectivaly.
|
293
|
+
|
294
|
+
* Fix bug where '::' was parsed as :colon2 instead of :colon3 when in
|
295
|
+
an args scope. Fixes #213
|
296
|
+
|
297
|
+
* Remove lots of properties added to opal classes. This makes normal
|
298
|
+
js constructors a lot closer to opal classes, making is easier to
|
299
|
+
treat js classes as opal classes.
|
300
|
+
|
301
|
+
* Merge Hash.from_native into Hash.new
|
302
|
+
|
303
|
+
## 0.3.44 2013-05-31
|
304
|
+
|
305
|
+
* Cleanup runtime, and remove various flags and functions from opal
|
306
|
+
objects and classes (moving them to runtime methods).
|
307
|
+
|
308
|
+
* Remove some activesupport methods into external lib.
|
309
|
+
|
310
|
+
* Add/fix lots of String methods, with specs.
|
311
|
+
|
312
|
+
* Add more methods to MatchData class.
|
313
|
+
|
314
|
+
* Implement $' and $` variables.
|
315
|
+
|
316
|
+
* Opal can now call methods on all native objects, via method missing
|
317
|
+
dispatcher.
|
318
|
+
|
319
|
+
* Add Opal::Environment as custom sprockets subclass which adds all
|
320
|
+
opal load paths automatically.
|
321
|
+
|
322
|
+
## 0.3.43 2013-05-02
|
323
|
+
|
324
|
+
* Stop inlining respond_to? inside the parser. This now fully respects
|
325
|
+
an object overriding respond_to?.
|
326
|
+
|
327
|
+
* Expose `Opal.eval()` function when parser is loaded for parsing
|
328
|
+
and running strings of ruby code.
|
329
|
+
|
330
|
+
* Add erb to corelib (as well as compiler to gem lib). ERB files with
|
331
|
+
.opalerb extension will automatically be compiled into Template
|
332
|
+
constant.
|
333
|
+
|
334
|
+
* Added some examples into examples/ dir.
|
335
|
+
|
336
|
+
* Add Opal.send() javascript function for sending methods to ruby
|
337
|
+
objects.
|
338
|
+
|
339
|
+
* Native class for wrapping and interacting with native objects and
|
340
|
+
function calls.
|
341
|
+
|
342
|
+
* Add local_storage to stdlib as a basic wrapper around localStorage.
|
343
|
+
|
344
|
+
* Make method_missing more performant by reusing same dispatch function
|
345
|
+
instead of reallocating one for each run.
|
346
|
+
|
347
|
+
* Fix Kernel#format to work in firefox. String.prototype.replace() had
|
348
|
+
different semantics for empty matching groups which was breaking
|
349
|
+
Kernel#format.
|
350
|
+
|
351
|
+
## 0.3.42 2013-03-21
|
352
|
+
|
353
|
+
* Fix/add lots of language specs.
|
354
|
+
|
355
|
+
* Seperate sprockets support out to opal-sprockets gem.
|
356
|
+
|
357
|
+
* Support %r[foo] style regexps.
|
358
|
+
|
359
|
+
* Use mspec to run specs on corelib and runtime. Rubyspecs are now
|
360
|
+
used, where possible to be as compliant as possible.
|
361
|
+
|
362
|
+
## 0.3.41 2013-02-26
|
363
|
+
|
364
|
+
* Remove bin/opal - no longer required for building sources.
|
365
|
+
|
366
|
+
* Depreceate Opal::Environment. The Opal::Server class provides a better
|
367
|
+
method of using the opal load paths. Opal.paths still stores a list of
|
368
|
+
load paths for generic sprockets based apps to use.
|
369
|
+
|
370
|
+
## 0.3.40 2013-02-23
|
371
|
+
|
372
|
+
* Add Opal::Server as an easy to configure rack server for testing and
|
373
|
+
running Opal based apps.
|
374
|
+
|
375
|
+
* Added optional arity check mode for parser. When turned on, every method
|
376
|
+
will have code which checks the argument arity. Off by default.
|
377
|
+
|
378
|
+
* Exception subclasses now relfect their name in webkit/firefox debuggers
|
379
|
+
to show both their class name and message.
|
380
|
+
|
381
|
+
* Add Class#const_set. Trying to access undefined constants by a literal
|
382
|
+
constant will now also raise a NameError.
|
383
|
+
|
384
|
+
## 0.3.39 2013-02-20
|
385
|
+
|
386
|
+
* Fix bug where methods defined on a parent class after subclass was defined
|
387
|
+
would not given subclass access to method. Subclasses are now also tracked
|
388
|
+
by superclass, by a private '_inherited' property.
|
389
|
+
|
390
|
+
* Fix bug where classes defined by `Class.new` did not have a constant scope.
|
391
|
+
|
392
|
+
* Move Date out of opal.rb loading, as it is part of stdlib not corelib.
|
393
|
+
|
394
|
+
* Fix for defining methods inside metaclass, or singleton_class scopes.
|
395
|
+
|
396
|
+
## 0.3.38 2013-02-13
|
397
|
+
|
398
|
+
* Add Native module used for wrapping objects to forward calls as native
|
399
|
+
calls.
|
400
|
+
|
401
|
+
* Support method_missing for all objects. Feature can be enabled/disabled on
|
402
|
+
Opal::Processor.
|
403
|
+
|
404
|
+
* Hash can now use any ruby object as a key.
|
405
|
+
|
406
|
+
* Move to Sprockets based building via `Opal::Processor`.
|