Sha256: 25525c62d257a9b24c9f3634b6e66c8bc8a9bf97278ac70b31d24372c32f6917

Contents?: true

Size: 639 Bytes

Versions: 12

Compression:

Stored size: 639 Bytes

Contents

##
# Symbol ISO Test

assert('Symbol') do
  assert_equal :"a", :a
  assert_equal :"a#{1}", :a1
  assert_equal :'a', :a
  assert_equal :'a#{1}', :"a\#{1}"
end

assert('Symbol', '15.2.11') do
  assert_equal Class, Symbol.class
end

assert('Symbol#===', '15.2.11.3.1') do
  assert_true :abc === :abc
  assert_false :abc === :cba
end

assert('Symbol#id2name', '15.2.11.3.2') do
  assert_equal 'abc', :abc.id2name
end

assert('Symbol#to_s', '15.2.11.3.3') do
  assert_equal  'abc', :abc.to_s
end

assert('Symbol#to_sym', '15.2.11.3.4') do
  assert_equal :abc, :abc.to_sym
end

assert('Symbol#to_proc') do
  assert_equal 5, :abs.to_proc[-5]
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
script_core-0.3.2 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.3.0 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.7 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.6 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.5 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.4 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.3 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.2 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.1 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.2.0 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.1.1 ext/enterprise_script_service/mruby/test/t/symbol.rb
script_core-0.1.0 ext/enterprise_script_service/mruby/test/t/symbol.rb