-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into truffle-head
- 9.4.12.0
- 9.4.11.0
- 9.4.10.0
- 9.4.9.0
- 9.4.8.0
- 9.4.7.0
- 9.4.6.0
- 9.4.5.0
- 9.4.4.0
- 9.4.3.0
- 9.4.2.0
- 9.4.1.0
- 9.4.0.0
- 9.3.15.0
- 9.3.14.0
- 9.3.13.0
- 9.3.12.0
- 9.3.11.0
- 9.3.10.0
- 9.3.9.0
- 9.3.8.0
- 9.3.7.0
- 9.3.6.0
- 9.3.5.0
- 9.3.4.0
- 9.3.3.0
- 9.3.2.0
- 9.3.1.0
- 9.3.0.0
- 9.2.21.0
- 9.2.20.1
- 9.2.20.0
- 9.2.19.0
- 9.2.18.0
- 9.2.17.0
- 9.2.16.0
- 9.2.15.0
- 9.2.14.0
- 9.2.13.0
- 9.2.12.0
- 9.2.11.1
- 9.2.11.0
- 9.2.10.0
- 9.2.9.0
- 9.2.8.0
- 9.2.7.0
- 9.2.6.0
- 9.2.5.0
- 9.2.4.1
- 9.2.4.0
- 9.2.3.0
- 9.2.2.0
- 9.2.1.0
- 9.2.0.0
- 9.1.17.0
- 9.1.16.0
- 9.1.15.0
- 9.1.14.0
- 9.1.13.0
- 9.1.12.0
- 9.1.11.0
- 9.1.10.0
- 9.1.9.0
- 9.1.8.0
- 9.1.7.0
- 9.1.6.0
- 9.1.5.0
- 9.1.4.0
- 9.1.3.0
Showing
54 changed files
with
1,651 additions
and
1,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
actionpack | ||
# actionpack | ||
activesupport | ||
activemodel | ||
algebrick |
300 changes: 0 additions & 300 deletions
300
lib/ruby/truffle/jruby+truffle/gem_configurations/actionpack.yaml
This file was deleted.
Oops, something went wrong.
87 changes: 0 additions & 87 deletions
87
lib/ruby/truffle/jruby+truffle/gem_configurations/activemodel.yaml
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
lib/ruby/truffle/jruby+truffle/gem_configurations/activesupport.yaml
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
lib/ruby/truffle/jruby+truffle/gem_configurations/concurrent-ruby.yaml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
lib/ruby/truffle/jruby+truffle/gem_configurations/monkey_patch.yaml
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
lib/ruby/truffle/jruby+truffle/gem_configurations/openweather.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
239 changes: 239 additions & 0 deletions
239
lib/ruby/truffle/jruby+truffle/lib/truffle/actionpack_exclusions.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,239 @@ | ||
--- | ||
ActionDispatch::Journey::GTG::TestGeneralizedTable: | ||
- test_to_svg # blocking | ||
ActionPackAssertionsControllerTest: | ||
- test_render_file_absolute_path | ||
- test_render_file_relative_path | ||
AssertTemplateTest: | ||
- test_assert_template_reset_between_requests | ||
- test_fails_with_repeated_name_in_path | ||
- test_file_with_absolute_path_success | ||
- test_file_with_relative_path_success | ||
- test_with_file_failure | ||
FunctionalFragmentCachingTest: | ||
- test_fragment_caching | ||
- test_fragment_caching_with_variant | ||
IntegrationProcessTest: | ||
- test_cookie_persist_to_next_request | ||
- test_https_and_port_via_host_and_https! | ||
- test_https_and_port_via_process | ||
- test_port_via_host! | ||
- test_port_via_process | ||
- test_cookie_persist_to_next_request_on_another_domain | ||
- test_get | ||
- test_get_with_parameters | ||
- test_get_with_query_string | ||
- test_get_xml_rss_atom | ||
- test_head | ||
- test_post | ||
- test_redirect | ||
- test_request_with_bad_format | ||
- test_respect_removal_of_default_headers_by_a_controller_action | ||
- test_response_cookies_are_added_to_the_cookie_jar_for_the_next_request | ||
- test_xml_http_request_get | ||
ApplicationIntegrationTest: | ||
- test_missing_route_helper_after_controller_access | ||
- test_missing_route_helper_before_controller_access | ||
ActionController::SSETest: | ||
- test_basic_sse | ||
- test_sse_with_event_name | ||
- test_sse_with_id | ||
- test_sse_with_multiple_line_message | ||
- test_sse_with_retry | ||
ActionController::LiveStreamTest: | ||
- test_abort_with_full_buffer | ||
- test_async_stream | ||
- test_bad_request_in_controller_before_streaming | ||
- test_exception_callback_when_committed | ||
- test_exception_handling_html | ||
- test_exception_handling_plain_text | ||
- test_exception_in_controller_before_streaming | ||
- test_exceptions_raised_handling_exceptions_and_committed | ||
- test_ignore_client_disconnect | ||
- test_live_stream_default_header | ||
- test_render_text | ||
- test_set_cookie | ||
- test_stale_with_etag | ||
- test_stale_without_etag | ||
- test_thread_locals_get_copied | ||
- test_write_to_stream | ||
ExpiresInRenderTest: | ||
- test_dynamic_render_with_file | ||
- test_permitted_dynamic_render_file_hash | ||
RequestForgeryProtectionControllerUsingResetSessionTest: | ||
- test_should_emit_a_csrf-param_meta_tag_and_a_csrf-token_meta_tag | ||
- test_should_render_button_to_with_token_tag | ||
- test_should_render_form_with_token_tag | ||
- test_should_render_form_with_token_tag_if_remote_and_authenticity_token_requested | ||
- test_should_render_form_with_token_tag_if_remote_and_external_authenticity_token_requested | ||
- test_should_render_form_with_token_tag_if_remote_and_external_authenticity_token_requested_and_embedding_is_on | ||
- test_should_render_form_with_token_tag_with_authenticity_token_requested | ||
RequestForgeryProtectionControllerUsingExceptionTest: | ||
- test_should_render_button_to_with_token_tag | ||
- test_should_render_form_with_token_tag | ||
- test_should_render_form_with_token_tag_if_remote_and_authenticity_token_requested | ||
- test_should_render_form_with_token_tag_if_remote_and_external_authenticity_token_requested | ||
- test_should_render_form_with_token_tag_if_remote_and_external_authenticity_token_requested_and_embedding_is_on | ||
- test_should_render_form_with_token_tag_with_authenticity_token_requested | ||
FreeCookieControllerTest: | ||
- test_should_not_render_button_to_with_token_tag | ||
- test_should_not_render_form_with_token_tag | ||
RescueControllerTest: | ||
- test_block_rescue_handler_with_argument | ||
- test_block_rescue_handler_with_argument_as_string | ||
- test_proc_rescue_handle_with_argument | ||
- test_proc_rescue_handle_with_argument_as_string | ||
SendFileTest: | ||
- test_send_file_with_action_controller_live | ||
TestCaseTest: | ||
- test_assert_select_with_body | ||
- test_assert_select_without_body | ||
- test_should_not_impose_childless_html_tags_in_xml | ||
MimeControllerLayoutsTest: | ||
- test_format_with_inherited_layouts | ||
- test_missing_layout_renders_properly | ||
RespondToControllerTest: | ||
- test_html_type_with_layout | ||
ContentNegotiation::TestContentNegotiation: | ||
- test_A_*/*_Accept_header_will_return_HTML | ||
RenderAction::RenderActionTest: | ||
- test_rendering_an_action_using_'<action>' | ||
- test_rendering_an_action_using_'<action>'_and_options | ||
- test_rendering_an_action_using_:action | ||
- test_rendering_an_action_using_:action_=>_:hello_world | ||
- test_rendering_an_action_using_:action_=>_<String> | ||
RenderAction::RenderLayoutTest: | ||
- test_rendering_with_layout_=>_'greetings' | ||
- test_rendering_with_layout_=>_:nil | ||
- test_rendering_with_layout_=>_false | ||
- test_rendering_with_layout_=>_true | ||
RenderActionWithApplicationLayout::LayoutTest: | ||
- test_rendering_implicit_application.html.erb_as_layout | ||
- test_rendering_with_layout_=>_'greetings' | ||
- test_rendering_with_layout_=>_:nil | ||
- test_rendering_with_layout_=>_false | ||
- test_rendering_with_layout_=>_true | ||
RenderActionWithApplicationLayout::TestLayout: | ||
- test_builder_works_with_layouts | ||
RenderActionWithControllerLayout::ControllerLayoutTest: | ||
- test_render_hello_world_and_implicitly_use_<controller_path>.html.erb_as_a_layout. | ||
- test_rendering_with_layout_=>_:nil | ||
- test_rendering_with_layout_=>_false | ||
- test_rendering_with_layout_=>_true | ||
RenderActionWithBothLayouts::ControllerLayoutTest: | ||
- test_rendering_implicitly_use_<controller_path>.html.erb_over_application.html.erb_as_a_layout | ||
- test_rendering_with_layout_=>_:nil | ||
- test_rendering_with_layout_=>_false | ||
- test_rendering_with_layout_=>_true | ||
RenderBody::RenderBodyTest: | ||
- test_rendering_body_with_layout:_'greetings' | ||
- test_rendering_body_with_layout:_true | ||
RenderContext::RenderContextTest: | ||
- test_rendering_using_the_controller_as_context | ||
- test_rendering_using_the_controller_as_context_with_layout | ||
RenderHtml::RenderHtmlTest: | ||
- test_rendering_text_with_layout:_'greetings' | ||
- test_rendering_text_with_layout:_true | ||
RenderImplicitAction::RenderImplicitActionTest: | ||
- test_available_action?_returns_true_for_implicit_actions | ||
- test_render_a_simple_action_with_new_explicit_call_to_render | ||
- test_render_an_action_called_not_implemented | ||
- test_render_an_action_with_a_missing_method_and_has_special_characters | ||
ControllerLayouts::RenderLayoutTest: | ||
- test_overriding_an_implicit_layout_with_render_:layout_option | ||
- test_rendering_a_normal_template,_but_using_an_implicit_NAMED_layout | ||
- test_rendering_a_normal_template,_but_using_the_implicit_layout | ||
ControllerLayouts::LayoutOptionsTest: | ||
- test_rendering_with_:layout_=>_false_leaves_out_the_implicit_layout | ||
ControllerLayouts::MismatchFormatTest: | ||
- test_a_layout_for_JS_is_ignored_even_if_explicitly_provided_for_HTML | ||
- test_if_XML_is_implicitly_selected,_an_HTML_template_is_not_also_selected | ||
- test_if_XML_is_selected,_an_HTML_template_is_not_also_selected | ||
ControllerLayouts::FalseLayoutMethodTest: | ||
- test_access_false_layout_returned_by_a_method/proc | ||
RenderPartial::TestPartial: | ||
- test_rendering_a_partial_in_ActionView_doesn't_pull_the_ivars_again_from_the_controller | ||
- test_rendering_a_template_with_renders_another_partial_with_other_format_that_renders_other_partial_in_the_same_format | ||
RenderPartial::TestInheritedPartial: | ||
- test_partial_from_child_controller_gets_picked | ||
- test_partial_from_parent_controller_gets_picked_if_missing_in_child_one | ||
RenderPlain::RenderPlainTest: | ||
- test_rendering_text_with_layout:_'greetings' | ||
- test_rendering_text_with_layout:_true | ||
RenderStreaming::StreamingTest: | ||
- test_do_not_stream_on_HTTP/1.0 | ||
- test_rendering_with_layout_exception | ||
- test_rendering_with_streaming_do_not_override_explicit_cache_control_given_to_render | ||
- test_rendering_with_streaming_enabled_at_the_class_level | ||
- test_rendering_with_streaming_given_to_render | ||
- test_rendering_with_streaming_no_layout | ||
- test_rendering_with_template_exception | ||
- test_rendering_with_template_exception_logs_the_exception | ||
- test_skip_rendering_with_streaming_at_render_level | ||
RenderTemplate::TestWithoutLayout: | ||
- test_rendering_a_builder_template | ||
- test_rendering_a_normal_template_with_full_path_without_layout | ||
- test_rendering_a_normal_template_with_full_path_without_layout_without_key | ||
- test_rendering_a_template_not_in_a_subdirectory | ||
- test_rendering_a_template_not_in_a_subdirectory_with_a_leading_slash | ||
- test_rendering_a_template_not_in_a_subdirectory_with_a_leading_slash_without_key | ||
- test_rendering_a_template_with_<%=raw_stuff_%> | ||
- test_rendering_a_template_with_error_properly_excerts_the_code | ||
- test_rendering_a_template_with_local_variables | ||
- test_rendering_a_template_with_local_variables_without_key | ||
- test_rendering_a_template_with_renders_another_template_with_other_format_that_renders_other_template_in_the_same_format | ||
RenderTemplate::TestWithLayout: | ||
- test_rendering_layout_=>_'greetings' | ||
- test_rendering_with_implicit_layout | ||
- test_rendering_with_layout_=>_:false | ||
- test_rendering_with_layout_=>_:nil | ||
- test_rendering_with_layout_=>_:true | ||
RenderTemplate::Compatibility::TestTemplateRenderWithForwardSlash: | ||
- test_rendering_a_normal_template_with_full_path_starting_with_a_leading_slash | ||
Render::RenderTest: | ||
- test_render_with_blank | ||
Render::TestOnlyRenderPublicActions: | ||
- test_raises_an_exception_when_a_method_of_Object_is_called | ||
- test_raises_an_exception_when_a_private_method_is_called | ||
Render::TestVariousObjectsAvailableInView: | ||
- test_The_action_name_is_accessible_in_the_view | ||
- test_The_controller_name_is_accessible_in_the_view | ||
- test_The_request_object_is_accessible_in_the_view | ||
Render::TestViewInheritance: | ||
- test_Template_from_child_controller_gets_picked_over_parent_one | ||
- test_Template_from_child_controller_with_custom_view_paths_appended_gets_picked_over_parent_one | ||
- test_Template_from_child_controller_with_custom_view_paths_prepended_gets_picked_over_parent_one | ||
- test_Template_from_parent_controller_gets_picked_if_missing_in_child_controller | ||
RenderText::RenderTextTest: | ||
- test_rendering_text_with_layout:_'greetings' | ||
- test_rendering_text_with_layout:_true | ||
CookiesTest: | ||
- test_encrypted_cookie_using_custom_digest | ||
- test_legacy_json_signed_cookie_is_read_and_transparently_upgraded_by_signed_json_cookie_jar_if_both_secret_token_and_secret_key_base_are_set | ||
- test_legacy_json_signed_cookie_is_read_and_transparently_upgraded_by_signed_json_hybrid_jar_if_both_secret_token_and_secret_key_base_are_set | ||
- test_legacy_signed_cookie_is_read_and_transparently_upgraded_by_signed_cookie_jar_if_both_secret_token_and_secret_key_base_are_set | ||
DebugExceptionsTest: | ||
- test_debug_exceptions_app_shows_user_code_that_caused_the_error_in_source_view | ||
- test_display_backtrace_on_template_missing_errors | ||
- test_display_backtrace_when_error_type_is_SyntaxError | ||
- test_display_backtrace_when_error_type_is_SyntaxError_wrapped_by_ActionView::Template::Error | ||
- test_displays_request_and_response_info_when_a_RoutingError_occurs | ||
- test_rescue_with_diagnostics_message | ||
- test_rescue_with_text_error_for_xhr_request | ||
- test_show_registered_original_exception_for_wrapped_exceptions | ||
TestGenerationPrefix::WithMountedEngine: | ||
- test_[ENGINE]_absolute_path_redirect_doesn't_use_SCRIPT_NAME_from_request | ||
- test_[ENGINE]_absolute_path_root_doesn't_use_SCRIPT_NAME_from_request | ||
- test_[ENGINE]_relative_path_redirect_uses_SCRIPT_NAME_from_request | ||
TestRoutingMapper: | ||
- test_redirect_modulo | ||
TestRedirectInterpolation: | ||
- test_path_redirect_escapes_interpolated_parameters_correctly | ||
- test_redirect_escapes_interpolated_parameters_with_redirect_proc | ||
TestGlobRoutingMapper: | ||
- test_glob_constraint | ||
QueryStringParsingTest: | ||
- test_query_string_with_many_ampersands | ||
CookieStoreTest: | ||
- test_deserializes_unloaded_classes_on_get_id | ||
- test_deserializes_unloaded_classes_on_get_value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
require 'pp' | ||
require 'yaml' | ||
|
||
stubs = { | ||
# TODO (pitr-ch 23-Jun-2016): remove? it's not used any more | ||
minitest: dedent(<<-RUBY), | ||
require 'minitest' | ||
# mock load_plugins as it loads rubygems | ||
def Minitest.load_plugins | ||
end | ||
RUBY | ||
|
||
activesupport_isolation: dedent(<<-RUBY), | ||
require 'active_support/testing/isolation' | ||
module ActiveSupport | ||
module Testing | ||
module Isolation | ||
def run | ||
with_info_handler do | ||
time_it do | ||
capture_exceptions do | ||
before_setup; setup; after_setup | ||
skip 'isolation not supported' | ||
end | ||
%w{ before_teardown teardown after_teardown }.each do |hook| | ||
capture_exceptions do | ||
self.send hook | ||
end | ||
end | ||
end | ||
end | ||
return self # per contract | ||
end | ||
end | ||
end | ||
end | ||
RUBY | ||
|
||
bcrypt: dedent(<<-RUBY), | ||
require 'bcrypt' | ||
module BCrypt | ||
class Engine | ||
def self.hash_secret(secret, salt, _ = nil) | ||
if valid_secret?(secret) | ||
if valid_salt?(salt) | ||
Truffle::Gem::BCrypt.hashpw(secret.to_s, salt.to_s) | ||
else | ||
raise Errors::InvalidSalt.new("invalid salt") | ||
end | ||
else | ||
raise Errors::InvalidSecret.new("invalid secret") | ||
end | ||
end | ||
def self.generate_salt(cost = self.cost) | ||
cost = cost.to_i | ||
if cost > 0 | ||
if cost < MIN_COST | ||
cost = MIN_COST | ||
end | ||
Truffle::Gem::BCrypt.gensalt(cost) | ||
else | ||
raise Errors::InvalidCost.new("cost must be numeric and > 0") | ||
end | ||
end | ||
end | ||
end | ||
RUBY | ||
|
||
html_sanitizer: dedent(<<-RUBY), | ||
require 'action_view' | ||
require 'action_view/helpers' | ||
require 'action_view/helpers/sanitize_helper' | ||
module ActionView | ||
module Helpers | ||
module SanitizeHelper | ||
def sanitize(html, options = {}) | ||
html | ||
end | ||
def sanitize_css(style) | ||
style | ||
end | ||
def strip_tags(html) | ||
html | ||
end | ||
def strip_links(html) | ||
html | ||
end | ||
module ClassMethods #:nodoc: | ||
attr_writer :full_sanitizer, :link_sanitizer, :white_list_sanitizer | ||
def sanitized_allowed_tags | ||
[] | ||
end | ||
def sanitized_allowed_attributes | ||
[] | ||
end | ||
end | ||
end | ||
end | ||
end | ||
RUBY | ||
|
||
}.reduce({}) do |h, (k, v)| | ||
file_name = "stub-#{k}" | ||
h.update k => { setup: { file: { "#{file_name}.rb" => v } }, | ||
run: { require: [file_name] } } | ||
end | ||
|
||
replacements = { | ||
bundler: dedent(<<-RUBY), | ||
module Bundler | ||
BundlerError = Class.new(Exception) | ||
def self.setup | ||
end | ||
end | ||
RUBY | ||
:'bundler/gem_tasks' => nil, | ||
java: nil, | ||
bcrypt_ext: nil, | ||
method_source: nil, | ||
:'rails-html-sanitizer' => nil, | ||
nokogiri: nil | ||
}.reduce({}) do |h, (k, v)| | ||
h.update k => { setup: { file: { "#{k}.rb" => v || %[puts "loaded '#{k}.rb' an empty replacement"] } } } | ||
end | ||
|
||
# add required replacements to stubs | ||
deep_merge!(stubs.fetch(:bcrypt), | ||
replacements.fetch(:java), | ||
replacements.fetch(:bcrypt_ext)) | ||
deep_merge!(stubs.fetch(:html_sanitizer), | ||
replacements.fetch(:'rails-html-sanitizer'), | ||
replacements.fetch(:nokogiri)) | ||
|
||
def exclusion_file(gem_name) | ||
data = YAML.load_file(__dir__ + "/#{gem_name}_exclusions.yaml") | ||
data.pretty_inspect | ||
end | ||
|
||
rails_common = | ||
deep_merge replacements.fetch(:bundler), | ||
setup: { without: %w(db job) }, | ||
run: { environment: { 'N' => 1 }, | ||
require: %w(rubygems date bigdecimal pathname openssl-stubs) } | ||
|
||
config :activesupport, | ||
deep_merge( | ||
rails_common, | ||
stubs.fetch(:activesupport_isolation), | ||
replacements.fetch(:method_source)) | ||
|
||
config :activemodel, | ||
deep_merge( | ||
rails_common, | ||
stubs.fetch(:activesupport_isolation), | ||
stubs.fetch(:bcrypt)) | ||
|
||
# TODO (pitr-ch 23-Jun-2016): investigate, fails intermittently | ||
config :actionpack, | ||
deep_merge( | ||
rails_common, | ||
stubs.fetch(:html_sanitizer), | ||
setup: { file: { 'excluded-tests.rb' => format(dedent(<<-RUBY), exclusion_file(:actionpack)), | ||
failures = %s | ||
require 'truffle/exclude_rspec_examples' | ||
Truffle.exclude_rspec_examples failures | ||
RUBY | ||
} }) | ||
|
||
config :'concurrent-ruby', | ||
setup: { file: { "stub-processor_number.rb" => dedent(<<-RUBY) } }, | ||
# stub methods calling #system | ||
require 'concurrent' | ||
module Concurrent | ||
module Utility | ||
class ProcessorCounter | ||
def compute_processor_count | ||
2 | ||
end | ||
def compute_physical_processor_count | ||
2 | ||
end | ||
end | ||
end | ||
end | ||
RUBY | ||
run: { require: %w(stub-processor_number) } | ||
|
||
config :monkey_patch, | ||
replacements.fetch(:bundler) | ||
|
||
config :openweather, | ||
replacements.fetch(:'bundler/gem_tasks') | ||
|
||
config :psd, | ||
replacements.fetch(:nokogiri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
fails:Kernel.chomp removes the final newline of $_ | ||
fails:Kernel.chomp removes the final carriage return of $_ | ||
fails:Kernel.chomp removes the final carriage return, newline of $_ | ||
fails:Kernel.chomp removes only the final newline of $_ | ||
fails:Kernel.chomp removes the value of $/ from the end of $_ | ||
fails:Kernel#chomp removes the final newline of $_ | ||
fails:Kernel#chomp removes the final carriage return of $_ | ||
fails:Kernel#chomp removes the final carriage return, newline of $_ | ||
fails:Kernel#chomp removes only the final newline of $_ | ||
fails:Kernel#chomp removes the value of $/ from the end of $_ | ||
fails:Kernel#chomp is a private method | ||
fails:Kernel.chomp removes the final carriage return, newline from a multi-byte $_ | ||
fails:Kernel#chomp removes the final carriage return, newline from a multi-byte $_ | ||
slow:Kernel.chomp removes the final newline of $_ | ||
slow:Kernel.chomp removes the final carriage return of $_ | ||
slow:Kernel.chomp removes the final carriage return, newline of $_ | ||
slow:Kernel.chomp removes only the final newline of $_ | ||
slow:Kernel.chomp removes the value of $/ from the end of $_ | ||
slow:Kernel#chomp removes the final newline of $_ | ||
slow:Kernel#chomp removes the final carriage return of $_ | ||
slow:Kernel#chomp removes the final carriage return, newline of $_ | ||
slow:Kernel#chomp removes only the final newline of $_ | ||
slow:Kernel#chomp removes the value of $/ from the end of $_ | ||
slow:Kernel#chomp is a private method | ||
slow:Kernel.chomp removes the final carriage return, newline from a multi-byte $_ | ||
slow:Kernel#chomp removes the final carriage return, newline from a multi-byte $_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
fails:Kernel.chop removes the final character of $_ | ||
fails:Kernel.chop removes the final carriage return, newline of $_ | ||
fails:#chop is a private method | ||
fails:#chop removes the final character of $_ | ||
fails:#chop removes the final carriage return, newline of $_ | ||
fails:Kernel.chop removes the final multi-byte character from $_ | ||
fails:Kernel#chop removes the final multi-byte character from $_ | ||
slow:Kernel.chop removes the final character of $_ | ||
slow:Kernel.chop removes the final carriage return, newline of $_ | ||
slow:#chop is a private method | ||
slow:#chop removes the final character of $_ | ||
slow:#chop removes the final carriage return, newline of $_ | ||
slow:Kernel.chop removes the final multi-byte character from $_ | ||
slow:Kernel#chop removes the final multi-byte character from $_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. This | ||
# code is released under a tri EPL/GPL/LGPL license. You can use it, | ||
# redistribute it and/or modify it under the terms of the: | ||
# | ||
# Eclipse Public License version 1.0 | ||
# GNU General Public License version 2 | ||
# GNU Lesser General Public License version 2.1 | ||
|
||
$stable_global = 42 | ||
|
||
example "$stable_global", 42 | ||
|
||
$almost_stable_global = 1 | ||
$almost_stable_global = 2 | ||
|
||
example "$almost_stable_global", 2 | ||
|
||
100.times { |i| | ||
$unstable_global = i | ||
} | ||
|
||
counter example "$unstable_global" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
206 changes: 170 additions & 36 deletions
206
truffle/src/main/java/org/jruby/truffle/core/encoding/EncodingNodes.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 62 additions & 34 deletions
96
truffle/src/main/java/org/jruby/truffle/core/string/StringNodes.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
truffle/src/main/java/org/jruby/truffle/interop/cext/CExtString.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This | ||
* code is released under a tri EPL/GPL/LGPL license. You can use it, | ||
* redistribute it and/or modify it under the terms of the: | ||
* | ||
* Eclipse Public License version 1.0 | ||
* GNU General Public License version 2 | ||
* GNU Lesser General Public License version 2.1 | ||
*/ | ||
package org.jruby.truffle.interop.cext; | ||
|
||
import com.oracle.truffle.api.interop.ForeignAccess; | ||
import com.oracle.truffle.api.interop.TruffleObject; | ||
import com.oracle.truffle.api.object.DynamicObject; | ||
|
||
public final class CExtString implements TruffleObject { | ||
|
||
private final DynamicObject string; | ||
|
||
public CExtString(DynamicObject string) { | ||
this.string = string; | ||
} | ||
|
||
public DynamicObject getString() { | ||
return string; | ||
} | ||
|
||
@Override | ||
public ForeignAccess getForeignAccess() { | ||
return CExtStringMessageResolutionForeign.ACCESS; | ||
} | ||
|
||
} |
100 changes: 100 additions & 0 deletions
100
truffle/src/main/java/org/jruby/truffle/interop/cext/CExtStringMessageResolution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This | ||
* code is released under a tri EPL/GPL/LGPL license. You can use it, | ||
* redistribute it and/or modify it under the terms of the: | ||
* | ||
* Eclipse Public License version 1.0 | ||
* GNU General Public License version 2 | ||
* GNU Lesser General Public License version 2.1 | ||
*/ | ||
package org.jruby.truffle.interop.cext; | ||
|
||
import static org.jruby.truffle.core.string.StringOperations.rope; | ||
import com.oracle.truffle.api.CompilerDirectives; | ||
import com.oracle.truffle.api.interop.CanResolve; | ||
import com.oracle.truffle.api.interop.MessageResolution; | ||
import com.oracle.truffle.api.interop.Resolve; | ||
import com.oracle.truffle.api.interop.TruffleObject; | ||
import com.oracle.truffle.api.nodes.Node; | ||
import org.jruby.truffle.RubyContext; | ||
import org.jruby.truffle.RubyLanguage; | ||
import org.jruby.truffle.core.rope.RopeNodes.GetByteNode; | ||
import org.jruby.truffle.core.rope.RopeNodesFactory.GetByteNodeGen; | ||
import org.jruby.truffle.core.string.StringNodes.SetByteNode; | ||
import org.jruby.truffle.core.string.StringNodesFactory.SetByteNodeFactory; | ||
|
||
@MessageResolution( | ||
receiverType = CExtString.class, | ||
language = RubyLanguage.class | ||
) | ||
public class CExtStringMessageResolution { | ||
|
||
@CanResolve | ||
public abstract static class Check extends Node { | ||
|
||
protected static boolean test(TruffleObject receiver) { | ||
return receiver instanceof CExtString; | ||
} | ||
|
||
} | ||
|
||
@Resolve(message = "HAS_SIZE") | ||
public static abstract class ForeignHasSizeNode extends Node { | ||
|
||
protected Object access(CExtString object) { | ||
return true; | ||
} | ||
|
||
} | ||
|
||
@Resolve(message = "GET_SIZE") | ||
public static abstract class ForeignGetSizeNode extends Node { | ||
|
||
protected Object access(CExtString cExtString) { | ||
return rope(cExtString.getString()).byteLength(); | ||
} | ||
|
||
} | ||
|
||
@Resolve(message = "READ") | ||
public static abstract class ForeignReadNode extends Node { | ||
|
||
@Child private GetByteNode getByteNode; | ||
|
||
protected Object access(CExtString cExtString, int index) { | ||
return getHelperNode().executeGetByte(rope(cExtString.getString()), index); | ||
} | ||
|
||
private GetByteNode getHelperNode() { | ||
if (getByteNode == null) { | ||
CompilerDirectives.transferToInterpreterAndInvalidate(); | ||
getByteNode = insert(GetByteNodeGen.create(null, null)); | ||
} | ||
return getByteNode; | ||
} | ||
|
||
} | ||
|
||
@Resolve(message = "WRITE") | ||
public static abstract class ForeignWriteNode extends Node { | ||
|
||
@Child private Node findContextNode; | ||
@Child private SetByteNode setByteNode; | ||
|
||
protected Object access(CExtString cExtString, int index, Object value) { | ||
return getHelperNode().executeSetByte(cExtString.getString(), index, value); | ||
} | ||
|
||
private SetByteNode getHelperNode() { | ||
if (setByteNode == null) { | ||
CompilerDirectives.transferToInterpreterAndInvalidate(); | ||
findContextNode = insert(RubyLanguage.INSTANCE.unprotectedCreateFindContextNode()); | ||
RubyContext context = RubyLanguage.INSTANCE.unprotectedFindContext(findContextNode); | ||
setByteNode = insert(SetByteNodeFactory.create(context, null, null, null, null)); | ||
} | ||
return setByteNode; | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.