Non-repeating random numbers Find the shortest way to generate a random number between 0-9 without repeating the last generated number.  Here is an example written in javascript.

var n=t=0;
while(n==t){
  t=Math.floor(Math.random()*9);
}
n=t;


I don't know if it is possible, but it would be interesting if there is a solution using only one variable. 

To clarify the solution can be in any language. Based on the comments I am going to disallow using arrays since apparently that makes it very easy and this is code-golf so the shortest answer wins.
Pyth, 7 bytes

e=+ZhO9


Try it online: Demonstration

Explanation

          implicit: Z = 0
     O9   Generate a random int from [0, 1, ..., 8]
    h     add 1
 =+Z      add this to Z and update Z
e         print Z modulo 10