Sorting program in ruby
Basically I'm trying to create a BASIC sorting program in ruby without using _.sort_ .
Here's my code so far:

    unsorted = [134,121,112,2,31,23,1] #The unsorted numbers
    sorted = []#The empty array for the unsorted numbers 
    loops = unsorted.size #number of loops
    numsmall = 0 #Variable for the smallest number so far
    numsecondsmall = 0 #Variable for the second to smallest number 
    a = 0 #number variable
    b = 1 #2nd number variable 
    while loops !=1 #Beginning of a loop that loops the same number of times as the 'loops' variable
    if unsorted[a] <<== unsorted[b] then numsmall == unsorted[a] #if the first element in  #the 'unsorted' array is less than the second then the variable 'numsmall' will be equal to first element of the unsorted array  
    else numsmall = unsorted[b] #else numsecondsmall will be equal to the second element in the unsorted array 
    end #ends the if statement
    end #ends the loop

Please help me with the code

Sorting program in ruby
===

Basically I'm trying to create a BASIC sorting program in ruby without using _.sort_ .
Here's my code so far:

    unsorted = [134,121,112,2,31,23,1] #The unsorted numbers
    sorted = []#The empty array for the unsorted numbers 
    loops = unsorted.size #number of loops
    numsmall = 0 #Variable for the smallest number so far
    numsecondsmall = 0 #Variable for the second to smallest number 
    a = 0 #number variable
    b = 1 #2nd number variable 
    while loops !=1 #Beginning of a loop that loops the same number of times as the 'loops' variable
    if unsorted[a] <<== unsorted[b] then numsmall == unsorted[a] #if the first element in  #the 'unsorted' array is less than the second then the variable 'numsmall' will be equal to first element of the unsorted array  
    else numsmall = unsorted[b] #else numsecondsmall will be equal to the second element in the unsorted array 
    end #ends the if statement
    end #ends the loop

Please help me with the code
