Ruby MongoMapper中push_uniq的奇怪行为

Ruby MongoMapper中push_uniq的奇怪行为,ruby,mongodb,mongomapper,Ruby,Mongodb,Mongomapper,在Ruby中,我使用MongoMapper进行了以下测试: test = (push_uniq @a.id, title: 'test') puts test.class puts test.to_s 结果我得到: Fixnum 136 为什么是136 有人吗?这里没有足够的上下文。这是什么课?什么是@a?测试显然被分配了数字136,所以puts语句正确地反映了这一点。我们需要知道这个类的定义。相反,od@a它可以是'something',结果仍然是Fixnum

在Ruby中,我使用MongoMapper进行了以下测试:

test = (push_uniq @a.id, title: 'test')
puts test.class
puts test.to_s
结果我得到:

Fixnum
136
为什么是136


有人吗?

这里没有足够的上下文。这是什么课?什么是@a?测试显然被分配了数字136,所以puts语句正确地反映了这一点。我们需要知道这个类的定义。相反,od@a它可以是'something',结果仍然是Fixnum