Displaying 3 results from an estimated 3 matches for "print_x".
Did you mean:
print_l
2006 Jan 04
0
Doesn''t "find" call initialize?
class Item < ActiveRecord::Base
def initialize(*args)
super
@x = 5
end
def print_x
puts @x
end
end
item_new = Item.new
item_new.print_x # output: 5
item_find = Item.find(1) # this record is in the database
item_find.print_x # output: nil
I thought the output would be 5 in both cases, since Item.find returns a
new object of Item and so Item.initialize would be ca...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...;); \
+ PRINT_L('\r')
+
+#define PRINT_LONG(n) \
+ movl n, %ebx; \
+ PRINT_NUM_BX; \
+ PRINT_L('\n'); \
+ PRINT_L('\r')
+
+#define PRINT_QUAD(n) \
+ movq n, %rbx; \
+ PRINT_NUM_BX; \
+ PRINT_L('\n'); \
+ PRINT_L('\r')
+
+#define PRINT_X \
+ PRINT_L('x')
+
+#define PRINT_OUT(x) \
+ mov $0x3f8, %esi; \
+21: lea 0x5(%esi), %edx; \
+ movzwl %dx, %edx; \
+ in (%dx), %al; \
+ test $0x20,%al; \
+ jne 22f; \
+ pause; \
+ jmp 21b; \
+22: \
+ movl %esi, %edx; \
+ movzwl %dx, %edx; \
+ mov...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...;); \
+ PRINT_L('\r')
+
+#define PRINT_LONG(n) \
+ movl n, %ebx; \
+ PRINT_NUM_BX; \
+ PRINT_L('\n'); \
+ PRINT_L('\r')
+
+#define PRINT_QUAD(n) \
+ movq n, %rbx; \
+ PRINT_NUM_BX; \
+ PRINT_L('\n'); \
+ PRINT_L('\r')
+
+#define PRINT_X \
+ PRINT_L('x')
+
+#define PRINT_OUT(x) \
+ mov $0x3f8, %esi; \
+21: lea 0x5(%esi), %edx; \
+ movzwl %dx, %edx; \
+ in (%dx), %al; \
+ test $0x20,%al; \
+ jne 22f; \
+ pause; \
+ jmp 21b; \
+22: \
+ movl %esi, %edx; \
+ movzwl %dx, %edx; \
+ mov...