summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/eql_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/eql_spec.rb')
-rw-r--r--spec/ruby/core/string/eql_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/ruby/core/string/eql_spec.rb b/spec/ruby/core/string/eql_spec.rb
new file mode 100644
index 0000000000..46ebeda509
--- /dev/null
+++ b/spec/ruby/core/string/eql_spec.rb
@@ -0,0 +1,21 @@
+require_relative '../../spec_helper'
+require_relative 'shared/eql'
+
+describe "String#eql?" do
+ it_behaves_like :string_eql_value, :eql?
+
+ describe "when given a non-String" do
+ it "returns false" do
+ 'hello'.should_not.eql?(5)
+ not_supported_on :opal do
+ 'hello'.should_not.eql?(:hello)
+ end
+ 'hello'.should_not.eql?(mock('x'))
+ end
+
+ it "does not try to call #to_str on the given argument" do
+ (obj = mock('x')).should_not_receive(:to_str)
+ 'hello'.should_not.eql?(obj)
+ end
+ end
+end
nohover-highlight'> * doc/*: Move entry to default gems category from standard library. * lib/shell/*: Added `Shell::VERSION` and re-used it with @RELEASE_VERSION. * test/shell/test_command_processor.rb: added missing require for test library. * tool/sync_default_gems.rb: Support shell library. We need to ignore shellwords.rb when syncing shell* files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-07-20Promote Tracer to default gems.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-07-17Promote Synchronizer to default gems.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-07-09Promote irb library to default gems.hsbt * lib/irb/irb.gemspec: init. * lib/irb/version.rb: Set @RELEASE_VERSION value to IRB::VERSION for gemspec. * doc/*.rdoc: Move IRB entry to default gems category. * tool/sync_default_gems.rb: Add irb support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-20ConditionVariable and Queue is not standard library.hsbt They are located under the Thread class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-08Re-add Matrix to doc/standard_library.rdoc [ci skip]kazu git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-07Promote Matrix to default gems.hsbt The upstream repository is https://github.com/ruby/matrix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-07Promote OpenStruct to default gems.hsbt Upstream repository is https://github.com/ruby/ostruct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-02Promote Prime library to default gems.hsbt * Its upstream is https://github.com/ruby/prime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-02Promote Logger to default gems.hsbt * Its upstream is https://github.com/ruby/logger. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-02Promote REXML to default gems.hsbt * upstream repostiory is https://github.com/ruby/rexml git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2018-06-02Promote RSS library to default gems.hsbt Its upstream was moved to https://github.com/ruby/rss. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-12-01Added bundler entry to documentation of library and maintainers.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-04-21Removed mathn.rb from stdlib. It's deprecated from Ruby 2.2.hsbt [Feature #10169][[ruby-core:64553]] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-04-06Update library entry for stringio and fiddle.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-28Added initial gemspec for SDBM module.hsbt [Feature #13261] * doc/*.rdoc: Move SDBM entry to default gem section. * ext/sdbm/sdbm.gemspec: first gemspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-27Added initial gemspec for Etc module.hsbt [Feature #13256] * doc/*.rdoc: move Etc module to default gem section. * ext/etc/etc.gemspec: first gemspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-24Update maintainers and standard library docs for GDBM.hsbt [Feature #13248][ruby-core:79742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-14Added initial gemspec for Scanf module.hsbt [Feature #13213] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-10Added initial gemspec for Fcntl module.hsbt [Feature #13206] * ext/fcntl/fcntl.gemspec: initial commit. * doc/maintainers.rdoc, doc/standard_library.rdoc: Move Fcntl module to Default gems section. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-09Update latest infomation of standard libraries.hsbt * Added Bundled gems section. * Added IO::console to Default gems. * Move XMLRPC to Bundled gems section. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2017-02-09Separated default gems section.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-12-18doc/standard_library.rdoc: Tk is removed from stdlibktsj git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-11-06* doc/standard_library.rdoc: fix a typo [ci skip]sho-h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-11-05* doc/standard_library.rdoc: remove "thread.rb" phrase becausesho-h Queue and ConditionVariable were moved to built-in class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-05-02fix a typo [ci skip]kazu git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-04-30* doc/standard_library.rdoc: Remove obsoleted classes and modules.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2016-01-31standard_library.rdoc: fix typo [ci skip]nobu * doc/standard_library.rdoc: fix typo [Fix GH-1230] Spelling mistakes - outputing > outputting publich > publish git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2015-03-24* doc/standard_library.rdoc: strip.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2015-03-24* doc/standard_library.rdoc: move Thread to Extentions.hsbt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2015-02-15* doc/standard_library.rdoc: [DOC] delete removed libraries.sho-h [misc #10843] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2014-10-31* ext/dl/*: remove DL as it is replaced by Fiddle.tenderlove [Feature #5458] Thanks to Jonan Scheffler <jonanscheffler@gmail.com> for this patch * test/dl/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2013-12-10* doc/contributing.rdoc: [DOC] curses is no more in the stdliba_matsuda * doc/contributors.rdoc: Ditto. * doc/maintainers.rdoc: Ditto. * doc/contributors.rdoc: Ditto. * doc/standard_library.rdoc: Ditto. * doc/syntax/modules_and_classes.rdoc: Ditto. * encoding.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e