!=不是ruby 1.8中的一个方法,而是硬连接为调用==的否定

#2


3  

Since the second half of the question hasn't been answered yet:

既然问题的后半部分还没有答案:

'A'.send(:==, 'B').send(:!) # Ruby 1.9

!'A'.send(:==, 'B')         # Ruby 1.8

#1


5  

!= isn't a method in ruby 1.8 It's hardwired to be the negation of calling ==

!=不是ruby 1.8中的一个方法,而是硬连接为调用==的否定

#2


3  

Since the second half of the question hasn't been answered yet:

既然问题的后半部分还没有答案:

'A'.send(:==, 'B').send(:!) # Ruby 1.9

!'A'.send(:==, 'B')         # Ruby 1.8
标签:

相关文章