@@ -55,8 +55,11 @@ Sets a keys and values to hashes.
...
@@ -55,8 +55,11 @@ Sets a keys and values to hashes.
#### Example
#### Example
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
and what class the passed in value is. This example sets a key and value pair to a hash. In pure Ruby doing this is equivalent to a = {:da_key => 80}.
and what class the passed in value is. This example sets a key and value pair to a hash. In pure Ruby doing this is equivalent to:
```Ruby
a = {:da_key => 80}
```
```C
```C
#include <stdio.h>
#include <stdio.h>
...
@@ -114,8 +117,12 @@ Gets a value from a key.
...
@@ -114,8 +117,12 @@ Gets a value from a key.
#### Example
#### Example
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
and what class the passed in value is. This example gets a value from a key. In pure Ruby doing this is equivalent to a = {:da_key => 80}
and what class the passed in value is. This example gets a value from a key. In pure Ruby doing this is equivalent to:
a[:da_key].
```Ruby
a = {:da_key => 80}
a[:da_key]
```
```C
```C
#include <stdio.h>
#include <stdio.h>
...
@@ -177,9 +184,12 @@ Deletes hash key and value pair.
...
@@ -177,9 +184,12 @@ Deletes hash key and value pair.
#### Example
#### Example
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
and what class the passed in value is. This example deletes hash key and value pair. In pure Ruby doing this is equivalent to a = {:da_key1 => 80,:da_key2 => 90}
and what class the passed in value is. This example deletes hash key and value pair. In pure Ruby doing this is equivalent to:
a.delete(:da_key2)
```Ruby
a = {:da_key1 => 80,:da_key2 => 90}
a.delete(:da_key2)
```
```C
```C
#include <stdio.h>
#include <stdio.h>
...
@@ -308,9 +318,12 @@ Clears the hash.
...
@@ -308,9 +318,12 @@ Clears the hash.
#### Example
#### Example
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument
and what class the passed in value is. This example clears the hash. In pure Ruby doing this is equivalent to
and what class the passed in value is. This example clears the hash. In pure Ruby doing this is equivalent to: