- Timestamp:
- Jul 9, 2020, 8:51:43 AM (4 years ago)
- 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 3 3 4 4 alias intern to_sym 5 6 def to_proc7 ->(obj,*args,&block) do8 obj.__send__(self, *args, &block)9 end10 end11 5 12 6 ## … … 49 43 return nil unless other.kind_of?(Symbol) 50 44 lhs = self.to_s; lhs.upcase! 51 rhs = other.to_s ; rhs.upcase!45 rhs = other.to_s.upcase 52 46 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 53 60 end 54 61
Note:
See TracChangeset
for help on using the changeset viewer.