summaryrefslogtreecommitdiff
path: root/spec/ruby/core/symbol/element_reference_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/symbol/element_reference_spec.rb')
-rw-r--r--spec/ruby/core/symbol/element_reference_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/symbol/element_reference_spec.rb b/spec/ruby/core/symbol/element_reference_spec.rb
new file mode 100644
index 0000000000..df6bc15ddb
--- /dev/null
+++ b/spec/ruby/core/symbol/element_reference_spec.rb
@@ -0,0 +1,6 @@
+require_relative '../../spec_helper'
+require_relative 'shared/slice'
+
+describe "Symbol#[]" do
+ it_behaves_like :symbol_slice, :[]
+end
are not that useful if you want to do authentication with them. Automatic decoding by default would break backwards compatibility. Optional automatic decoding via a keyword to URI.parse would require threading the option through at least 3 other methods, and would make semantics confusing (user= takes encoded or unencoded password?) or require more work. Thus, adding this as a separate method seemed the simplest approach. Unfortunately, URI lacks a method for correct decoding. Unlike in www form components, + in earlier parts of the URI such as the userinfo section is treated verbatim and not as an encoded space. Add URI.#{en,de}code_uri_component methods, which are almost the same as URI.#{en,de}code_www_form_component, but without the special SP => + handling. Implements [Feature #9045] https://github.com/ruby/uri/commit/16cfc4e92f