data=RandomReal[{-1,1},10]

bubbleSort=data//.{a___,b_,c_,d___}/;b>c->{a,c,b,d}

mSort=Sort[data]

bubbleSort===mSort