What should be the path to the file while using #attached in a custom_module_block_view()?
You should use drupal_get_path() function to construct the path of your asset file (in your case the JS file).

To include the YOUR_MODULE.js file which sits in a subfolder js, part of your custom module

$block = array
(
    'subject' =&gt; t('My block title'),
    'content' =&gt; array(
        '#markup' =&gt; '&lt;p&gt;' . t('This is some text that will go in the block.') . '&lt;/p&gt;',
        '#attached' =&gt; array(
            'js' =&gt; array(drupal_get_path('module', 'YOUR_MODULE_NAME') . '/js/YOUR_MODULE.js'),
        ),
    ),
);