This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

set_encoding_by_bom

        # IO.set_encoding_by_bom

(from ruby core)
---
    ios.set_encoding_by_bom   -> encoding or nil

---

Checks if `ios` starts with a BOM, and then consumes it and sets the
external encoding.  Returns the result encoding if found, or nil.  If
`ios` is not binmode or its encoding has been set already, an exception
will be raised.

    File.write("bom.txt", "\u{FEFF}abc")
    ios = File.open("bom.txt", "rb")
    ios.set_encoding_by_bom    #=>  #<Encoding:UTF-8>

    File.write("nobom.txt", "abc")
    ios = File.open("nobom.txt", "rb")
    ios.set_encoding_by_bom    #=>  nil



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.