Kernel::big_endian? and Kernel::little_endian? 
Author Message
 Kernel::big_endian? and Kernel::little_endian?

I'd like to be able to determine the endian-ness of the architecture Ruby
is running on.  Currently, you must use some hack like

    [1].pack('l')

which yields 0 or 1, depending on endian-ness.

I propose instead that we add two methods to Kernel: big_endian? and
little_endian?

Could we add these as Kernel methods?  Is it worth it?

Jason Voegele



Tue, 21 Sep 2004 03:53:50 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Convert BIG_ENDIAN to LITTLE_ENDIAN?

2. A Win32Forth kernel that supports PROC and CALL from the kernel directly.

3. visual works 3.1 image has segmentation fault on 2.4 kernel (red hat 8.0)

4. density estimation, kernel functions etc

5. Real Time OS Kernel in Smalltalk?

6. Smalltalk-80 compatible implementation of kernel classes

7. VWNC3.1 on linux kernel 2.2.14

8. Kernel does not understand "abtPackagerOpenInitialViews"

9. VW Kernel Profiling

10. How do I use GetVersion() from windows kernel

11. FlagShip 4.48 and RH 7.1 (kernel 2.4.2)

12. Creating OO micro-kernel O/S with Eiffel ???

 

 
Powered by phpBB® Forum Software