/// Returns a Vector of ancestors of current module
///
/// # Examples
///
/// ### Getting all the ancestors
///
/// ```
/// use rutie::{Module, VM};
/// # VM::init();
///
/// let process_module_ancestors = Module::from_existing("Process").ancestors();
///
/// let expected_ancestors = vec![
///     Module::from_existing("Process")
/// ];
///
/// assert_eq!(process_module_ancestors, expected_ancestors);
/// ```
///
/// ### Searching for an ancestor
///
/// ```
/// use rutie::{Module, VM};
/// # VM::init();
///
/// let record_module = Module::new("Record");
///
/// let ancestors = record_module.ancestors();
///
/// assert!(ancestors.iter().any(|module| *module == record_module));
/// ```
// Using unsafe conversions is ok, because MRI guarantees to return an `Array` of `Module`es
Returns a Vector of ancestors of current module
Returns a Vector of ancestors of current module
pub fn ancestors(&self) -> Vec<Module> {
        let ancestors = Array::from(class::ancestors(self.value()));
        ancestors
            .into_iter()
            .map(|module| unsafe { module.to::<Self>() })
            .collect()
    }
pub fn ancestors ( & self ) -> Vec < Module > { let ancestors = Array :: from ( class :: ancestors ( self . value ( ) ) ) ; ancestors . into_iter ( ) . map ( | module | unsafe { module . to :: < Self > ( ) } ) . collect ( ) }
Returns a Vector of ancestors of current module
Returns a Vector of ancestors of current module
&self
examples
None
getting all the ancestors
None
vm::init();
let process_module_ancestors = Module::from_existing("Process").ancestors().

let expected_ancestors = vec![
Module::from_existing("Process")
].


let process_module_ancestors = Module :: from_existing ( " Process " ) . ancestors () . let expected_ancestors = vec! [ Module :: from_existing ( " Process " ) ] .
searching for an ancestor
None
vm::init();
let record_module = Module::new("Record").

let ancestors = record_module.ancestors().

assert!(ancestors.iter().any(|module| *module == record_module));
```
Using unsafe conversions is ok, because MRI guarantees to return an `Array` of `Module`es
let record_module = Module :: new ( " Record " ) . let ancestors = record_module . ancestors () . assert! ( ancestors . iter () . any ( |module| * module == record_module )) ; ` ` ` Using unsafe conversions is ok because MRI guarantees to return an ` Array ` of ` Module ` es