Rearranging a set of numbers into order The Question
Given a set of 9 numbers, m[], which contains only numbers 1 through 9 in a random order, with no two numbers being the same, create a program in any language which rearranges the number to be in numerical order (1, 2, 3, etc. etc.) by only switching two numbers which are next to each other (ie. 1, 3, 2 → 1, 2, 3).
Rules

You may only modify the set by switching two numbers which are next to each other
The ending numbers (1 through 9 in order) should be contained in m[]
You can use any language you would like
The answer with the smallest amount of bytes wins

Edit:
Your code does not have to print the output, but the rearranged array must be in m[].
CJam, 15 bytes
q~A{{a+$~}*]}*p

How it works:
q~                     e# Read the CJam styled input array (For ex. [1 3 4 2 5 6 8 7 9])
  A{        }*         e# Run the loop 10 times. This is enough times for a 10 length
                       e# input array in a bubble sort
    {    }*            e# reduce
     a+$~              e# Rearrange the pair so that they are sorted
           ]           e# After each loop, wrap the numbers back into the array
              p        e# Print the array after the loops are done

Try it online here