From: David Koontz Date: 2005-12-04T13:36:02+09:00 Subject: Updating the original reference of a variable I'm working on a library similar to what DL does and I'm having a problem with implementing variables that are to be passed as pointers. I have all the C side code working, the problem is updating the original variable with a modified value (for example you are calling a function that takes two int* and sets their values based on some initilization). My setup for passing the call along to the C function is to splat the parameters into an array and pass the array and the function name into the C layer which then makes the call into the loaded library. def dispatch(ruby_name, *args) self.class.fl_call_function(@function_handles[ruby_name], args) end If in the C layer I modify the value of one of the array elements that value is changed when I return but I don't have a way of propogating that array element's value to the original variable that was passed in. Is there any way to get the object containing the variable (maybe by using the object_id?) that was passed in and then use that to set a new value for the variable? David Koontz