opensource.atlassian.com/projects/hibernate/browse/HHH-2605
够倒霉,有段时间没关注hibernate了,直接用原来的pom文件导入3.2.4版本,结果遇到这种低级错误,升级到3.2.5就好了。
class Song attr_reader :name, :artist, :duration def initialize(name, artist, duration) @name = name @artist = artist @duration = duration end def <=>(other) self.duration <=> other.duration end def to_s "Song: #{@name}--#{@artist} (#{@duration}) ...
class Hanoi def initialize(n = 3) @nDisks = n end def start
#假设从A移到C move(@nDisks,'A','B','C') end private def move(n, from, inter, to) if(n==1) print 'Disk 1 from ', from, ' to ', to, "\n" else move(n-1, from, to, inter) print "Disk #{n} from & ...
class String def rot13 self.tr('a-zA-Z','n-za-mN-ZA-M') endend
#这是什么东西
puts 'V Ybir Lbh'.rot13
class Array
#搅乱数组
def shuffle size = self.size array = Array.new(size) (0...size).each do |i| index = rand(size).to_i if array[index] == nil array[index] = self[i] else index = (index >= size-1)? 0 : (index + 1) until array[index] == nil arra ...







评论排行榜