Ignore:
Timestamp:
Jul 9, 2020, 8:51:43 AM (4 years ago)
Author:
coas-nagasima
Message:

mrubyを2.1.1に更新

Location:
EcnlProtoTool/trunk/mruby-2.1.1
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-symbol-ext/mrblib/symbol.rb

    r321 r439  
    33
    44  alias intern to_sym
    5 
    6   def to_proc
    7     ->(obj,*args,&block) do
    8       obj.__send__(self, *args, &block)
    9     end
    10   end
    115
    126  ##
     
    4943    return nil unless other.kind_of?(Symbol)
    5044    lhs =  self.to_s; lhs.upcase!
    51     rhs = other.to_s; rhs.upcase!
     45    rhs = other.to_s.upcase
    5246    lhs <=> rhs
     47  end
     48
     49  ##
     50  # call-seq:
     51  #   sym.casecmp?(other)  -> true, false, or nil
     52  #
     53  # Returns true if sym and other_sym are equal after case folding,
     54  # false if they are not equal, and nil if other_sym is not a string.
     55
     56  def casecmp?(sym)
     57    c = self.casecmp(sym)
     58    return nil if c.nil?
     59    return c == 0
    5360  end
    5461
Note: See TracChangeset for help on using the changeset viewer.