see above source code
how to pass @aa(in C2) value to @bb(in C1) ?
@aa is a dynamic value
not allowed conditions are
- class variable ,global variable are NOT allowed
- passing arguments is not allowed( C1.new.met(@aa) is not allow)
- there is no inheritance relationship between class C1,C2
- should not modify class C2 and source2.rb
allowed conditions are
- instance variable ,local variable are allowed
- iterators ,callback are allowed
- allowed to modify class C1 and source1.rb (if needed)
- others are allowed
i got this aptitude ruby question from my friend(he got it from an
can any one solve this?