InQusitive InQusitive - 1 year ago 69
Ruby Question

What is the ruby equivalent of #define A B in C/C++?

Is there any Ruby equivalent of C/C++ macro?

#define something somethingelse

Answer Source

Ruby projects typically have neither a pre-processing nor a compilation step and usage of any pre-processor is not common.

You can define constants by using capitalized variable names.

However, if you really need a pre-processor then you can use CPP with ruby or any other language - it does not really care about the actual syntax.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download