I want to set environment variable programatically with ruby. In Golang we have
syscall.Exec(os.Getenv(SHELL), []string{os.Getenv(SHELL)}, updated)
This opens a new default shell with the updated variables. So the terminal where we execute the go program will have those variables persisted for the session.
I'm new to ruby not able to find the equivalent there. Please help me.