Skip to content

Instantly share code, notes, and snippets.

@mozz100
Created August 11, 2015 08:03
Show Gist options
  • Save mozz100/cf136b59f3a92cfdab88 to your computer and use it in GitHub Desktop.
Save mozz100/cf136b59f3a92cfdab88 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a = []\n",
"6.times do\n",
" a += [\"bler\"]\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[\"blah\", \"blah\", \"blah\", \"blah\", \"blah\", \"blah\"]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.map{|e| e.gsub \"er\", \"ah\"}"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Ruby 2.1.5",
"language": "ruby",
"name": "ruby"
},
"language_info": {
"file_extension": "rb",
"mimetype": "application/x-ruby",
"name": "ruby",
"version": "2.1.5"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment