More precisely: When I load the upper code in a second time, I received the following warning…
Normally a ruby file of the extension loaded once when SU starts, and the constants are defined only once. During testing, when you are reloading a file the constants will be defined again, that is the reason you get the warning.
A constant is a type of variable which always starts with a capital letter . Constants are used for values that aren’t supposed to change, but Ruby doesn’t prevent you from changing them, but you will see this warning message.
You can find more for example here.Everything You Need to Know About Ruby Constants
During testing, let say Yes it is. But you have to be care to not define the constants e.g. in your methods again. Leave your constants definitions on top of the code outside of the methods…
You can check this topic: